HOW TO RANDOM NUMBER FOR COMMAND WAIT SECOND iMACRO

Hello everyone. Today I will present how to random number for command WAIT SECOND in iMacro.

WAIT SECOND is command of iMacro is a very important statement. This command has a delay function. Number of seconds we can define as needed, minimum is 0.

Every time to use jQuery in .iim file, I like to use this command between line of jQuery and other line iMacro. Because jQuery works, it takes a while to complete the command.

And so, Sometime we need to random number of seconds and this I will present how to random number. For random number I will use this command.
1. EVAL command of iMacro.
2. Math.random() command of JavaScript we will use in file type .iim.
3. Math.floor() command of JavaScript we will use in file type .iim.

OK. Let's go to coding.
***All detail in this page you need to see the video to understand.

HOW TO RANDOM NUMBER FOR COMMAND WAIT SECOND iMACRO

In video, Line 2 to 3 I will not expand. Because that is basic of iMacro command.
In line 3 I will use command set create VAR 1 for get value of EVAL command.

In EVAL command we will use JavaScript.
First, I create variable name XX to get value from random.
After that I will use command Math.floor(). This command is a divisor statement that is rounded to an integer.

Within brackets of Math.floor(), I will use Math.random().

Math.random() command will randomly assign a numeric value between 0 and 1.
The result of using this command. We have a lot of decimal numbers and Math.floor command will round the integer number.

I will experiment with random numbers from 1 to 20.

Now, We will test code iMacro.
In video, you can see number in command WAIT SECOND is random every time we play code iMacro.

  1. SET !VAR1 EVAL("var xx=Math.floor(Math.random()*(MaxNumber-MinNumber))+MinNumber; xx;") 
  2. WAIT SECONDS={{!VAR1}}
Now we can random number between number is we want. See example in video.

You can download example code below video.
Thank you for watching, and we hope to enjoy all video. Bye.

2 comments:

  1. online casino for real money in the US - Ambien Hoppeie
    The online casino has a large selection of casino games and many slots. There are plenty of different options that you can 온라인 카지노 총판 play on the site,

    ReplyDelete

SCROLL DOWN THE WEBSITE WITH iMACRO.

hello, Today I will present How to scroll down web site by iMacro. If you use iMacro for your jobs and you have a problem iMacro don't ...