Hello everyone. I follow this forum for 4 months now. I am learning Java very slowly and i stumped on a problem i can't solve with forum or google. So please help.
Here is my code that works (it clicks on screen and writes some text (ALALA) and presses enter):
I am having no problem at all when i don't have special characters like (ČĆŠŽÄ) Example:
NetBeans gives me error:
[log] CLICK on L(362,328)@S(0)[0,0 1920x1200]
[info] Write: Ä
Exception in thread "main" java.lang.IllegalArgumentException: Cannot convert character Ä
Java Result: 1
BUILD SUCCESSFUL (total time: 2 seconds)
If you have a look at the javadoc, you'll see some information that seems to confirm your thought that it's a "problem" with Sikuli. It looks like the write() and type() methods use some special syntax to simulate typing on a keyboard. I would assume that for this reason, they don't support any sort of extended character set that includes special characters.
I've never used Sikuli but from a quick look at the docs in link provided by Jason it looks like the write method allows you to enter codes to build up combination key strokes such as CTRL+ALT+A so if you know the keystrokes required (presumably from a US QWERTY keyboard as that appears to be the only keyboard mapping that is supported) to get the character you want to input you may be able to fudge the input that way. Not an ideal solution I grant you but it may work.