How to create region button like sikulix IDE

Asked by Javier Gonzales Rodriguez

Hello there,

Am trying to implement a button where the user select the region on screen like sikulix IDE.

Can someone share how to get it drawing a rectangle on screen?

Honestly with sikulx IDE is pretty easy to do it, so i want to implement it to have the same.

Regards!

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

If Java is ok for you:

The starting point (Region Button) is
org.sikuli.ide.SikulixIDE::ButtonSubregion::actionPerformed (when the user clicks the button)

The work is done in
org.sikuli.script.Screen.doPrompt (ask the user to draw the rectangle)

The result comes back here:
org.sikuli.ide.SikulixIDE::ButtonSubregion::update

Be aware: the solution is for multi-monitor environments and it is straight forward but not simple.

Revision history for this message
Javier Gonzales Rodriguez (stonegarden21) said :
#2

Thanks RaiMan, that solved my question.