← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #212238]: Drag and Drop auto-selecting X, y of each point while performing action

 

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

RaiMan proposed the following answer:
--- extensions ...
nothing available at the moment

--- understood your challenge now (hope so;-)
The solution might be a script, that defines a hotkey, that you press, when the mouse position is ready.
Then in the hotkey handler you can get the mouse location via Env.getMouseLocation().

so you could start the script, let it wait for the hotkey being pressed,
move the mouse manually to the desired location and press the hotkey.

This is the principle.

Another option to show Locations to a Sikuli script (synchronously in this case) is to use selectRegion("move mouse to position and click right"). This would bring up the capture prompt, you move the mouse to the position and click right (which just aborts the capture). internally you again use Env.getMouseLocation(), to get the currentLocation.
This is a bit more dangerous, than the first version (but much easier to script;-), since you might move the mouse slightly, when pressing the right Button. Alternatively you could try ESC to cancel the capture after mouse positioning.

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