[check] Inconsistant behavior for app.focus and swtchApp depending on method of running script

Bug #1376425 reported by Osiris2258
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SikuliX
In Progress
Medium
RaiMan

Bug Description

There seems to be inconsistent behavior if you run the script from different places in windows 7 64 (SP1 Home Premium). Running Sikuli 1.0.1.

if I run a script containing:
check = switchApp('wammp - TightVNC Viewer')

or

VNC = App('wammp - TightVNC Viewer')
VNC.focus()

from the sikuli IDE or the windows command prompt, it brings the window to the front.

If, however, using python 2.7.5, I run the command in a script from inside a python program , or from idle or other python command lines using the subprocess module, I get different behavior.

python call:

process = subprocess.Popen(['C:\\Users\\USER\\Desktop\\sikuli\\runScript.cmd', '-r', 'C:\\Users\\USER\\Desktop\\sikuli\\scripts\\run_PCS', '--args', name, waittime],shell=True,stdout=subprocess.PIPE,stderr=subprocess.PIPE)

In this case, the exact same sikuli script that worked when run with the IDE or directly from CMD will instead fail to bring the window forward. The window icon on the taskbar will begin flashing, but it will not actually bring the window forward.

RaiMan (raimund-hocke)
summary: - Inconsistant behavior for app.focus and swtchApp depending on method of
- running script
+ [1.0.1] Inconsistant behavior for app.focus and swtchApp depending on
+ method of running script
Changed in sikuli:
status: New → In Progress
importance: Undecided → High
assignee: nobody → RaiMan (raimund-hocke)
milestone: none → 1.2.0
RaiMan (raimund-hocke)
Changed in sikuli:
importance: High → Medium
milestone: 2.0.0 → 2.1.0
summary: - [1.0.1] Inconsistant behavior for app.focus and swtchApp depending on
+ [check] Inconsistant behavior for app.focus and swtchApp depending on
method of running script
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.