How to execute the sikuli commands in java

Asked by isivay2kx

Hi

Screen s = new Screen();
s.type("r","KEY_WIN", 0);
s.click("imgs/spotlight.png", 0);
s.wait("imgs/spotlight-input.png");
s.type(null, "hello world\n", 0);

Javadoc of SikuliWhen i run above code in eclipse through java i am getting javanullpointer exception.
Installation of application in windows The task as to be done as follows
1) Open the run
2)type the C:\abcfile.exe
3) run the image
4) Is there any commands to verify the text in the screen ??

Running in Windows Vista machine.

Note: How to pass the parameters for the type click commands in java. What are the parameters should be passed for PSRML in java.
(type(PSRML, String, int) - Method in class edu.mit.csail.uid.Region )

 Please give any suggestions for executing the above code.

Links: java program
http://sikuli.org/trac/wiki/How%20to%20use%20Sikuli%20Script%20in%20your%20JAVA%20programs

java api

Thanks
Siva

Question information

Language:
English Edit question
Status:
Answered
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

--- type(): look question
https://answers.launchpad.net/sikuli/+question/140392 (my second comment.)

KEY_WIN is not defined on the Java level.

--- If you want to get text from the screen, you have to use Sikuli X.
Have a look at the new docs at http://sikuli.org/docx/
Might be a good idea anyway, to find out what all the functions and parameters mean.

Can you help with this problem?

Provide an answer of your own, or ask isivay2kx for more information if necessary.

To post a message you must log in.