If I use CloseWindow and the program does not find the window give a error message.
Can I do something so that this error message does not appear and the script goes on running?
The new varibale RP_WAIT, what does it do exactly? Wait till all the tasks are done? Or only some of them?
Closing a window that maybe does not exists
Moderators: Dorian (MJT support), JRL
- Marcus Tettmar
- Site Admin
- Posts: 7380
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Hi,
Before doing your CloseWindow check first that the window is present with IfWindowOpen.
IfWindowOpen>MyWindow,CloseIt
Goto>Closed
Label>CloseIt
CloseWindow>MyWindow
Label>Closed
RP_WAIT tells the Run Program (Run) command to wait until the application/command/program it has invoked has terminated before allowing the script to proceed.
Before doing your CloseWindow check first that the window is present with IfWindowOpen.
IfWindowOpen>MyWindow,CloseIt
Goto>Closed
Label>CloseIt
CloseWindow>MyWindow
Label>Closed
RP_WAIT tells the Run Program (Run) command to wait until the application/command/program it has invoked has terminated before allowing the script to proceed.
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?
Yes.
Sample:
will run a DOSBox (under NT) which close automatically, piping a dir list of c:drive to a file. Execution off output file will be delayed till writing has finished. You won't get a sharing violation!
E.
Sample:
Code: Select all
Let>RP_WAIT=1
Run Program>cmd /c dir c:\*.* > c:\dirlist.txt
ExecuteFile>c:\dirlist.txt
E.