How to use popup() and input() in Java programs?

Asked by Krishna

Hi,
I have tried to write practice programs importing SikulixAPI.jar in both Jython and Java in Eclipse IDE.

In Jython code in Eclipse, I am able to directly call popup() and input() methods and get them to work while running.

But in Java code, I am not sure on how to use popup() and input() methods.

I have tried this :

import org.sikuli.script.*;
public class main {

 public static void main(String[] args) {
          {
                  Screen s = new Screen();
                  SikuliScript b = new SikuliScript();
                          s.click("starticon.png");
                          b.popup("hello"); }}

The error is "SikuliScript cannot be resolved to a type"

Is it possible to use popup, input, alert functions in java code while using SikulixAPI.jar?

Question information

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

switch to version 1.1.0 - start here: http://sikulix.com

the related Java API is here:
http://nightly.sikuli.de/docs/index.html

the related class for the functions ( ... and many more) you want to use are in class Sikulix.

Revision history for this message
Krishna (gokulakrishnaks-4) said :
#2

Thanks RaiMan, that solved my question.