Hullo there. I have been reading through the posts in the beginner section and had a look through the .pdf manual regarding the Random Label/Header. I see advice was given some time ago to one forum member regarding running a script at random intervals, as below:
Label>start
Random>57,interval
Let>interval=interval+1
Let>interval=interval*60
Wait>interval
V
V
V
GoTo>start
I want to run a script that will run randomly between 1 and 90 mins. What figures do I need to change in the above script to achieve this, as I am unsure what the "Random>57,interval" and "Let>interval=interval*60" actually refer to? Is this the minutes?
Also I see there is an option to allow multiple instances of Macro Scheduler to run. I want to run 2 different scripts, randomly (say 1-90 mins) on the same web page. Is there a way to instruct MS to run one script at a time? that is the second script wont start running until the first script has finished , or make it so the second script just "misses a turn" if it tries to run when the first script is still running?
Thankyou, Josey
Random Header/Script
Moderators: Dorian (MJT support), JRL
-
- Automation Wizard
- Posts: 1101
- Joined: Fri Jan 07, 2005 5:55 pm
- Location: Somewhere else on the planet
Re: Random Header/Script
Have you looked at the Help or Manual? These commands are well documented.pearshaped wrote: I want to run a script that will run randomly between 1 and 90 mins. What figures do I need to change in the above script to achieve this, as I am unsure what the "Random>57,interval" and "Let>interval=interval*60" actually refer to? Is this the minutes?
"interval" is a variable.
Random generates a number between 0 and the specified number, so to generate 1 to 90 use:
Random>89,interval
Let>interval=interval+1
Wait needs a number in seconds so that's why interval is multiplied by 60
-
- Newbie
- Posts: 2
- Joined: Mon Nov 07, 2005 9:50 am
Interval+1 means exactly that: "interval plus one", or "add one to interval". It increments the value of interval by one. So:
Let>interval=interval+1
means:
interval takes the value of interval plus one.
Lets say interval was 1 to start with:
Set the value of interval to the value of interval plus one. The value of interval is 1, so we set the value of interval to 1 plus 1 which equals 2. So interval now holds the value 2.
Let>interval=interval+1
means:
interval takes the value of interval plus one.
Lets say interval was 1 to start with:
Set the value of interval to the value of interval plus one. The value of interval is 1, so we set the value of interval to 1 plus 1 which equals 2. So interval now holds the value 2.
MJT Net Support
[email protected]
[email protected]