Hi, i have created a script which helps users log into various programs but i am having problems with the following lines:
WaitWindowOpen>windowtowatch*
Let>WWC_TIMEOUT=5
WaitWindowChanged>windowtowatch*
If>WWC_RESULT=FALSE
what to do
EndIf
For some reason the timeout is not working and it just waits indefinitely.
Also, on a different note.......is it possible to enable/disable a group of scheduled scripts using a radio button?
Thanks for any help you can give me
Mike
windowchanged timeout......
Moderators: JRL, Dorian (MJT support)
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
You have the syntax for WaitWindowChanged wrong. This command waits for the foreground window to change, so does not need a window title, and just takes a timeout value (in seconds). So you want:
WaitWindowOpen>windowtowatch*
WaitWindowChanged>5
If>WWC_RESULT=FALSE
...what to do
EndIf
WaitWindowOpen>windowtowatch*
WaitWindowChanged>5
If>WWC_RESULT=FALSE
...what to do
EndIf
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?
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Sorry. No, there's no way built into the interface to disable/enable a group of scripts together at once.
But what you can do is have each of these scripts check an INI file before they do anything else. In this INI file you set a flag that tells the script whether or not they should continue. Then all you need is another controlling script which modifies this INI file.
E.g. if the INI file looks like this:
[scriptcontrol]
enabled=YES
And at the start of each script have:
ReadIniFile>filename,scriptcontrol,enabled,continue
If>continue=YES
..
.. rest of script here
..
EndIf
And then all you need is one controlling script that lets you set this INI file using the EditIniFile command:
//to enable:
EditIniFile>filename,scriptcontrol,enabled,YES
//to disable:
EditIniFile>filename,scriptcontrol,enabled,NO
This method gives you complete flexibility and provides a semaphore technique for controlling scripts or parts of script code from another macro or program.
But what you can do is have each of these scripts check an INI file before they do anything else. In this INI file you set a flag that tells the script whether or not they should continue. Then all you need is another controlling script which modifies this INI file.
E.g. if the INI file looks like this:
[scriptcontrol]
enabled=YES
And at the start of each script have:
ReadIniFile>filename,scriptcontrol,enabled,continue
If>continue=YES
..
.. rest of script here
..
EndIf
And then all you need is one controlling script that lets you set this INI file using the EditIniFile command:
//to enable:
EditIniFile>filename,scriptcontrol,enabled,YES
//to disable:
EditIniFile>filename,scriptcontrol,enabled,NO
This method gives you complete flexibility and provides a semaphore technique for controlling scripts or parts of script code from another macro or program.
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?
Thanks again Marcus, that sounds like it should do exactly what I want, ill give it a go.......
Maybe that could be an idea for the next version of MS. Having the ability to control whether a group of scheduled tasks is enabled or not. This would enable a group of user to have MS running, but only one of them actually running scheduled tasks.
Mike
Maybe that could be an idea for the next version of MS. Having the ability to control whether a group of scheduled tasks is enabled or not. This would enable a group of user to have MS running, but only one of them actually running scheduled tasks.
Mike