You can use {wait 5} inside the keystoke. But then you may face the same problem again when the active window is changed while sending keystrokes. The solution to this is to use combination of Run, WindowWaitOpen, SendKeys, Wait, WindowFind, WindowActivate, and SendKeys again : I changed the script to use the "RunWithInput". The script is : provided below. What happens is that the script recognizes the : application, userid and password and brings up the correct main form : (tccom0401m000). However, it does not do anything after that. It just sits : there until the application timeout has kicked in. These are the same : settings I used in the other "run" statement, however, to get : them working, I had to insert wait(5) statements between each keystroke. : FYI, the data value "2664" is the first data input on the main : form. What do I do to get the system to recognuize the "2664"? : Thanks, : Gene Phares : dim return_code, number : runwithinput ( "C:\Program Files\BAAN\BIN\BW.EXE tccom0401m000", : "C:\Program Files\baan\bin", 30, : "userid{tab}password{enter}2664{tab}2664{tab}{tab}{tab}{tab}{enter}{enter}is{shift}-cr2pc{enter}{enter}{alt}fx", : 100, return_code )
|