sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #32546
Re: [Question #267301]: [1.1.0] build 2015-05-22: having a problem getting the region of an open window in 1.1
Question #267301 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/267301
Status: Open => Answered
RaiMan proposed the following answer:
ok, just tested:
this works in the moment:
myApp = App("Charlie")
if not myApp.isRunning:
# this is sufficient, no need for the extra
#App.open("c:\\Program Files\\Oracle\\VirtualBox.exe")
App.open("c:\\Program Files\\Oracle\\VirtualBox\\VBoxManage.exe startvm Charlie")
while not App("Charlie").isRunning(): # refresh the App instance
wait(1)
myApp = App("Charlie") # refresh the App instance
App("Charlie").focus()
regCharlie = Region(App.focusedWindow())
setROI(regCharlie)
# … more
App("Charlie").close()
--- this will work after the build 2015-05-25+:
myApp = App("Charlie")
if not myApp.isRunning:
App.open("c:\\Program Files\\Oracle\\VirtualBox\\VBoxManage.exe startvm Charlie")
while not myApp.isRunning(): # refreshing the App instance done internally
wait(1)
myApp.focus()
regCharlie = Region(App.focusedWindow())
setROI(regCharlie)
# … more
myApp.close()
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.