show a region on the screen

Asked by rob

are there any good ways of visualizing a region on the screen? for example is there a way to color in a region? or highlight the edges of a region?

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
rob
Solved:
Last query:
Last reply:
Revision history for this message
Roman Podolyan (podolyan-roman) said :
#1

Of course. They are even specified in the documentation (and I used that with RC3 and it worked):

http://doc.sikuli.org/region.html#Region.highlight
highlight([seconds])

    Highlight the region for some period of time.
    Parameters: seconds – a decimal number taken as duration in seconds

The region is highlighted showing a red colored frame around it. If the parameter seconds is given, the script is suspended for the specified time. If no time is given, the highlighting is started and the script continues. When later on the same highlight call without a parameter is made, the highlighting is stopped (behaves like a toggling switch).

Revision history for this message
Roman Podolyan (podolyan-roman) said :
#2

Р.S. At some point my script had a dozen of searches, so I used the Region.highlight() in routine, switching it on/off, to show that script is alive (not hanged). That attracted a lot attention from developers, errr, like "What is that blinking thing?"

Revision history for this message
rob (reg82) said :
#3

ok thanks, i guess i missed it somehow when i was reading through the docs.