Sikulixapi-2.0.4 not working after creating a jar of my Java SWt desktop application
Hi,
I have add sikulixapi-2.0.4 jar in my project's build path as external jar and implemented the functionality which I required. Its is working fine as fas a considered running the application in eclipse IDE. But when I export it as jar sikuli doesn't work at all. As I tried to run my jar via commandline to se verbose it enters the loop in while I havw written Sikuli logic but never ever passes the condition and feels like goes in infinite loop nor gives any error. Also I don't think there might be any error in my code. Here is the code below.
----------------- Code starts -------
@Override
public String call() throws Exception {
// ImagePath.
ImagePath.
+ "images");
Screen screen = null;
try {
System.
screen = new Screen();
while (true) {
if (screen.
System.
screen.
// Call captureAndSaveS
// and saving screenshot.
captureAnd
// Continue closing process.
screen.
screen.
screen.
screen.
screen.
break;
} else {
System.
screen.
}
}
} catch (Exception ex) {
ex.printStac
}
return "";
}
-------
I have implemented it as a thread to run when the image matches with my desktop application.
Kindly help and suggest the steps required. I am new to Sikuli.
Thanks
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- SikuliX Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask Kunal Deshpande for more information if necessary.