sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #36700
Re: [Question #283780]: how to change default screen to a custom region?
Question #283780 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/283780
Status: Open => Answered
Karl proposed the following answer:
You might use:
r = App.open(bluestacks_app).window() #http://sikulix-2014.readthedocs.org/en/latest/appclass.html?highlight=window#window
if r.exists("image1.png")
r.click("image1.png")
The IDE doesn't seem to update the region definition unless I change something in a script.
The scope of the region doesn't seem to change with indentation, but you can use the following to see what Sikuli thinks the region is:
print r
or
print r.x, r.y, r.w, r.h
Lastly, your screenshot in comment #5 indicates you're using exists
incorrectly. Exists does not take a region as a parameter; it only takes
a Pattern or string
(http://sikulix-2014.readthedocs.org/en/latest/region.html?highlight=click#Region.exists),
unlike all of the Region actions, including click,
(http://sikulix-2014.readthedocs.org/en/latest/region.html?highlight=click
#acting-on-a-region) which take PSMRL.
--
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.