[1.0.1] Windows8: App.open() does not work sometimes --- workaround: use run()
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SikuliX |
Confirmed
|
Medium
|
RaiMan |
Bug Description
******** workaround
you might use the run(cmd) instead of App.open()
--- Windows
result = run('start /i /b "%s"'%(app))
--- Mac
result = run('open "%s"'%(app))
--- Linux
??? (use a similar command to run something in an independent process)
result contains the textual output, that would be seen if you run the command on commadline
the first line might contain
*** error ***
if the trial to run the command returned an error (e.g. program not found)
on the Java level (might change in the future!)
import org.Sikuli.
.....
String result = SikuliScript.run(" ... some command ... ");
-------
I have Sikuli R930 installed on Windows 8 Enterprise x64 currently.
I have a script that installs software and it is not seeming to work properly.
I have 2 App open commands and one works fine and the other just never works.
the one that works fine is this:
Settings.tscode = App(os.
When this is called it opens a code generator application no problem
The one that does not work is this:
Settings.tssetup = App(os.
It never opens and says App not found.
Same exact script works perfectly on Windows 7 Pro x64
even if I dumb the APP open command to this:
tssetup = App(r'"
and call tssetup.open()
it says App not found.
If i dumb down the App that does work TSCODE to this:
TSCode = App(r'"
Retested all above with latest V1.01 with same results.
description: | updated |
summary: |
- [1.0.1] Sikuli unable to open some Apps in windows 8 --- workaround + [1.0.1] Windows8: App.open() does not work sometimes --- workaround |
description: | updated |
description: | updated |
summary: |
- [1.0.1] Windows8: App.open() does not work sometimes --- workaround + [1.0.1] Windows8: App.open() does not work sometimes --- workaround: use + run() |
Changed in sikuli: | |
milestone: | 1.1.0 → 1.2.0 |
Changed in sikuli: | |
status: | In Progress → Confirmed |
milestone: | 2.0.0 → none |
at least this c:\BUILD\ Setup.exe" ')
tssetup = App(r'"
should be: \BUILD\ Setup.exe" )
tssetup = App(r"c:
because in your version the " will be part of the app file name and hence does not exist.
Additional quoting is not necessary with the App feature.
The App open feature will be revised in version 1.1.0
For now you might try the following: join(r" \\tsarchive" , "Storage", "Timeslips", "Installations", Settings.tsVersion, Settings.tsBuild, "setup.exe") ).exec( cmd)
app = os.path.
import java.lang.Runtime as RT
cmd = ("start", "/i", "/b", app)
RT.getRuntime(
this will be used in version 1.1.0 for all situations, where we need to start something in parallel to Sikuli.