Ok, I think this has something to do with the bunch of invisible
windows, that FF has open.

If you try this with FF, you can see this:

ff = App("firefox")
for i in range(100):
    w = ff.window(i)
    if not w: break
    print w

So before running the snippet, manually make a "real" FF window the frontmost, 
and I think it should work.
I have always tested this way and it worked for me, even if the FF window was 
somewhere behind other windows.

When I am right, then there is currently no solution for that, because it is 
not possible, to get a special window to the front by saying:
ff.window(4).focus() 

@Benny
please paste here, how you did your "switch between Notepad and VLC Media 
Player"

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

Title:
  Windows XP: bug on focus() or switchApp?

Status in Sikuli:
  Invalid

Bug description:
  Is there some bug with focus() or switchApp() handled on windows? I
  noticed that if I use the same method on mac it works find and puts
  the application in the front, but when using it on windows it does
  not.

  what I did was put the application (ff) behind a different application (ie) 
and want to get a focus on it so it becomes the application in front.  
  code: 
  switchApp('firefox')

  or

  ff = App('firefox')
  ff.focus()

  - another q, is that if the application is minimized (win or mac),
  would focus() also work and open the application and put it in
  focus()?

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

_______________________________________________
Mailing list: https://launchpad.net/~sikuli-driver
Post to     : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp

Reply via email to