Hi,
Is there a command like waitfortext ?
I am trying to wait for the text "x record deleted" before closing the DOS window but I have difficulty doing that.
I have tried getcontroltext and getwindowtext without big success.
Can I use FindWindowWithText ?
Thanks
Wait for text
Moderators: Dorian (MJT support), JRL
Spoke a little on a similar subject here. Assuming this is a DOS program, you might be able to redirect the "x record deleted" message to a file and then detect the existance of the file to know when the process is completed.
Label>WaitingForFile
IfFileExists>c:\path\filename,ThroughWaiting
Wait>1
Goto>WaitingForFile
Label>ThroughWaiting
Before trying that, if this is a DOS program and you are running it from a
Run Program>cmd /c someprogram.exe
line. Set RP_WAIT=1 and the script will automatically stop and wait for the program to finish. The DOS window should close on its own. See help for Run Program>.
Label>WaitingForFile
IfFileExists>c:\path\filename,ThroughWaiting
Wait>1
Goto>WaitingForFile
Label>ThroughWaiting
Before trying that, if this is a DOS program and you are running it from a
Run Program>cmd /c someprogram.exe
line. Set RP_WAIT=1 and the script will automatically stop and wait for the program to finish. The DOS window should close on its own. See help for Run Program>.
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
I would use WaitScreenImage.
If that sounds confusing, consider that what is on the screen is really just an image. Capture the portion of the DOS screen that displays the text you want to wait for. Assuming it always looks the same you can then use WaitScreenImage. Make the capture as small and specific as possible.
If that sounds confusing, consider that what is on the screen is really just an image. Capture the portion of the DOS screen that displays the text you want to wait for. Assuming it always looks the same you can then use WaitScreenImage. Make the capture as small and specific as possible.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?