Jump to content
Macro Express Forums

how to create a random time intervall?


Recommended Posts

hi,

at first, i'm german so sry for my bad english :rolleyes:

 

i need to create a simple macro with a random time intervall.

now my macro looks like this:

 

<TEXTTYPE:<2><DELAY:1><TEXTTYPE:<3>

 

in this macro the delay is always 1 second.

 

 

but i need a random Delay between 1 and 10 seconds. how to do this?

Link to post
Share on other sites

Don't apologize for your English. It is a lot better than my German!

 

It will not be truly random, but you could use the TIME command (it is under TEXT), put the time into a variable, and use the rightmost digit of seconds as your delay. Change the digit to an integer (Nx) variable, and use that integer in the Wait Time Elapse command.

Link to post
Share on other sites

Use the Variable Set Integer %N1% with a Random Number command. However, since this command returns a random value between 0 and the maximum number entered you will need to add one to it. Then use that value in the Delay command. Like this:

Variable Set Integer %N1% with a Random Number
Variable Modify Integer: Inc (%N1%)
Delay %N1% Seconds

Copy and paste this into your macro:

<IVAR2:01:06:9><NMVAR:08:01:0:0000001:0:0000000><DELAY:%N1%>

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...