← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #205306]: How to use Java code and Sikuli to click menu items

 

Question #205306 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/205306

    Status: Open => Answered

RaiMan proposed the following answer:
Look: http://sikuli.org/docx/faq/030-java-dev.html#how-to-use-sikuli-
script-in-your-java-programs

You always need a Region or Screen object in Java (that click() can be
used without qualification and acts on SCREEN object (default screen
Screen(0) is a convenience feature at the Jython level)

the principal things needed:

import org.sikuli.script.*; // once in a source file

Screen s = new Screen(); // once in a source file (like a global
variable ;-)

s.click("some-image.png")

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.