sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #35164
[Question #272465]: Troulbe finding the screen # from App.focusedWindow?
New question #272465 on Sikuli:
https://answers.launchpad.net/sikuli/+question/272465
I'm simply trying to find the screen number that I am focused on.
PathChrome = "C:\Users\staffos\AppData\Local\Google\Chrome\Application\chrome.exe"
firstWindow = App.focusedWindow()
firstwindow = str(firstWindow)
print firstWindow
#firstWindow = "R[-1600,0 1600x900]@S(1)[-1600,0 1600x900] E:Y, T:3.0" # this works when put in manually
screenNum = firstWindow[firstWindow.find("(")+1:firstWindow.find(")")]
print screenNum
I can print firstWindow just fine. I can even search it's text just fine when I put it in manually, but for whatever reason I can't seem to get the code to work.
Any insight is appreciated. Thank you
--
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.