← Back to team overview

sikuli-driver team mailing list archive

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

 

Public bug reported:

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.

** Affects: sikuli
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/1376425

Title:
  Inconsistant behavior for app.focus and swtchApp depending on method
  of running script

Status in Sikuli:
  New

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.

To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/1376425/+subscriptions


Follow ups

References