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.

_______________________________________________
Mailing list: https://launchpad.net/~sikuli-driver
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp

Reply via email to