← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #184730]: Create Region Button in IDE to code

 

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

    Status: Open => Answered

RaiMan proposed the following answer:
--- Still, I wonder what is the value of the IDE's Create Region button?
The feature behind the CreateRegionBtn is selectRegion(), which allows to interactively define a Region object. The result in the IDE (if you look into the Python code or hover with the mouse on the thumbnail (which shows the region in pink on the screen content at the time, when the script was started)) is a Region(x,y,w,h).

My main usage is for testing purposes or quick&dirty stuff, to have a
region to work with without the need to derive it from something else
(which is normally needed if you want to run a script unattended).

-- example
r = selectRegion("select a text region")
print r.text()

to check, wether Sikuli can OCR-read a specific text, before investing
in lines of code.

--- set to solved, if it is so ;-)

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