Greetings, There are many different ways to do this - here's one. This uses the BWS Activate command. The Activate command, if it doesn't see the window you've told it to activate will fire an error. The below sub routine would spin a loop attempting to activate the specified window title. If err=0 that means the desired window is available:
Sub WaitForWindow(myWindow as string) On Error Resume Next Do until err=0 Wait Err=0 Activate myWindow Loop End sub I've used the above logic when I am shelling an application and need to wait for it to be fully loaded before I connect to it. If the script is something that needs to watch a user interacting with a given screen and react when specified screen (or keyboard/mouse events occur), then the Event Manager framework will be more appropriate. Take a look in the documentation in the section Boston EventManager. There is an example project in the bss70 directory called EventStation.BWS that is a good starting point - best practice is to open this and do a save as first. Let us know if you have any questions - we'll be happy to help. Regards, Thom Thom C. Blackwell Product Manager Boston Software Systems www.BostonWorkStation.com 866 653-5105 - ex 5 [EMAIL PROTECTED] -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Gayla Sent: Wednesday, June 22, 2005 4:22 PM To: [email protected] Subject: [Talk] Event driven script Does anyone have a sample of an event driven script? For example, I'd like to have my script wait around and look for a certain window, then begin a process. Gayla Breitner IT Consultant Office: 931.840.0811 Cell: 931.626.4034
