#This script shows how to allocate a tester and call its actions #When the script is run startup calc.exe within 30 seconds for a pass # #If calc is not run within 30 seconds the script will declare a failure. # Allocate a windows tester object and assign it to win win = new windows() #Find the calculator window waiting a maximum of 30 seconds hwnd = win.waitfor(30,"Calculator") #Close the calculator window win.postmessage(hwnd,"WM_CLOSE",0,0) #delete the tester object (this is done automatically if you forget) delete win