Created
June 5, 2015 08:01
-
-
Save sl5net/824ea1907aa29039ea39 to your computer and use it in GitHub Desktop.
sikuliX_multi_monitors_test15-06-05_09-59
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
n = getNumberScreens() | |
nNumverScreensExpected = 4 | |
print (Env.getSikuliVersion() , " " , n , " monitors." ) | |
for ScreenId in range(n): | |
print("----------------- ScreenId = ", ScreenId) | |
reg = Screen(ScreenId) | |
print("reg: x, y, w, h = ", reg.x , reg.y, reg.w, reg.h) | |
x = reg.x | |
y = reg.y | |
topLeft = Location(x, y) # equivalent to | |
topLeft = reg.getTopLeft() | |
botRight = reg.getBottomRight() | |
h = botRight.y - y | |
w = botRight.x - x | |
#reg.h = theWidth # equivalent to | |
#reg.setH(h) | |
#print(" x, y, w, h = ", x, y, w , h) | |
reg.setH(h) | |
reg.setY(y) | |
#print("") | |
print("reg: x, y, w, h = ", reg.x , reg.y, reg.w, reg.h) | |
#reg.setAsScreen() | |
# if ScreenId != 1: | |
# continue | |
reg.highlight(4) # dud red frame around for seconds | |
#reg.hover(3) | |
# reg.selectRegion("middle of region") | |
# SCREEN = reg | |
#Screen(0).setROI(reg) | |
# setROI(reg) | |
#mouse = new DesktopMouse() | |
# reg.setAutoWaitTimeout(100000) | |
#click("1432712960373.png") | |
if reg.exists("1432712960373.png"): | |
print("found at ScreenId = " , ScreenId) | |
reg.hover("1432712960373.png") | |
sleep(1000) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment