Hello again;
The good news is that I've gotten Macro Scheduler to do what I want it to do flawlessly now. {Meaning that I'll most likely be purchasing the software some time next week }
But I have one more concern. The windows which my script manages will sometimes disappear if they lose connection to the internet; the program automatically reconnects in 60s so this isn't a problem - or so I thought. Yet, if the script tries to run at this time it shows an error message because it is unable to find the window. Is there a way to disable these messages or set the script to auto abort and rerun at the next scheduled time?
Thanks.
Automatically Abort On Error
Moderators: Dorian (MJT support), JRL
-
- Junior Coder
- Posts: 26
- Joined: Fri May 16, 2008 12:30 pm
Try setting IGNOREERRORS to 1. Does not apply to VBScript errors (use on error next etc for VBScript errors). Set back to 0 for default behaviour.
Code: Select all
let>IGNOREERRORS=1
-
- Junior Coder
- Posts: 26
- Joined: Fri May 16, 2008 12:30 pm
Hi tommystery,
If you want the script to abort if your windows are not there (because your PC disconnected from the internet)... just have the script check for the presence of your window (or windows) and if they are not there... abort the script... or have the script wait for 60 seconds then try again.
By then if your PC has auto-reconnected to the internet and your windows are there... then the script should now work. If not, have the script wait another 60 seconds and try again. You could have it keep retrying every 60 seconds or add a loop that counts the failures and aborts the script for good after X tries... sounds an audible alarm, etc.
Let us know how you do and take care...
If you want the script to abort if your windows are not there (because your PC disconnected from the internet)... just have the script check for the presence of your window (or windows) and if they are not there... abort the script... or have the script wait for 60 seconds then try again.
By then if your PC has auto-reconnected to the internet and your windows are there... then the script should now work. If not, have the script wait another 60 seconds and try again. You could have it keep retrying every 60 seconds or add a loop that counts the failures and aborts the script for good after X tries... sounds an audible alarm, etc.
Let us know how you do and take care...
jpuziano
Note: If anyone else on the planet would find the following useful...
[Open] PlayWav command that plays from embedded script data
...then please add your thoughts/support at the above post -
Note: If anyone else on the planet would find the following useful...
[Open] PlayWav command that plays from embedded script data
...then please add your thoughts/support at the above post -
-
- Junior Coder
- Posts: 26
- Joined: Fri May 16, 2008 12:30 pm
That is a viable solution; however there are a couple of windows which are called under different circumstances and it would require some reworking of loops within the script.
That's why I was wondering if there is a simple global variable I can set.
I guess there isn't though.
Thanks for all your help.
That's why I was wondering if there is a simple global variable I can set.
I guess there isn't though.
Thanks for all your help.
You could run a 2nd script in the background that looks for the window with abort button and have it push push the abort button.
Or
Code: Select all
Label>Error Window Loop
Wait>1
IfWindowOpen>ERROR_WINDOW_NAME*
PushButton>ERROR_WINDOW_NAME*,Abort
PushButton>ERROR_WINDOW_NAME*,&Abort
Goto>Exit
Endif
goto>Error Window Loop
Label>Exit
Code: Select all
WaitWindowOpen>ERROR_WINDOW_NAME*
PushButton>ERROR_WINDOW_NAME*,Abort
PushButton>ERROR_WINDOW_NAME*,&Abort