sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #54252
Re: [Question #688862]: Windows: App.open: switch instance after creating multiple
Question #688862 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/688862
RaiMan proposed the following answer:
the solution is lowercase/uppercase in app name.
This works:
myApp = App("C:\\Windows\\system32\\notepad.exe")
myApp.open()
if (not myApp.isRunning()):
exit(1)
type("n", Key.SHIFT+Key.CTRL) # see comment
wait(3)
myApps = App.getApps("notepad.exe")
print myApps
app1 = myApps[0]
app2 = myApps[1]
app1.focus()
app1.window().highlight(2)
app2.focus()
app2.window().highlight(2)
comment: currently it is not possible to open a second instance with the
same application name (notepad.exe in this case), but with the type-hack
you can create a new instance, which is then recognized.
I will add a fix to 2.0.4, that app name comparisons are always don in
lowercase on Windows.
--
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.