← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #660399]: I can't get the full screen

 

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

    Status: Open => Answered

RaiMan proposed the following answer:
setRect() and setROI() are functional the same:
set the coordinates (x,y) and the dimension (w,h) to the given values.
That they exist both has historical reasons.

In the undotted use (no explicit region given) they address the current
default screen  and hence change its (x,y) and (w,h) values.

Since when running in the IDE nothing is reset by default (neither on
start nor at end).

So to avoid such unexpected behavior, you should not change the screen,
but instead work with Region objects.

myRegion = new Region(100,100,10,10)
myRegion.hover() # moves the mouse to the center of myRegion
capture() # same as capture(getScreen()))

will now capture the hole screen in all cases and a capture after run
also.

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.