← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #190010]: Best method for creating a region

 

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

RaiMan proposed the following answer:
To dynamically define a Region object, you have to construct it based on
other Regions or Matches you have already

e.g.
m = find("upper-left.png")
top = m.left(1).right(500) # a region m.h x 500 including m
area = top.below(600) # a region 500 x 600 below top (excluding)

If you need the app window, you might use the class App, that has some
features to return the region of the current app window:

# your app is frontmost
window = App.focusedWindow()

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