Re: wsh and Python

2005-04-09 Thread Roger Upole
Since AppActivate returns a boolean, you should be able to do something like this: while not shell.AppActivate(name): win32api.Sleep(100) Roger "David Josty" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hello > > I have this function : > --

wsh and Python

2005-04-09 Thread David Josty
Hello I have this function : import sys import win32com.client import win32api def close_softawre("name") shell = win32com.client.Dispatch("WScript.Shell") shell.AppActivate ("name") win32api.Sleep(100) shell.SendKeys ("%{F4