iMacros random number generator

With a perfect working free mozilla add-on version available,imacros is your tool to automate anything you are doing online.This varies from filling forms with diffrent info from databases,downloading webpages or many other things you would do online.However,today i’ll show you something does not come built-in in imacros,but can easily be doıne with a fragment of code.As it comes really handy sometimes,i’ll now show you how to create a random number between the range you choose,and use it as a variable in your script.This can be easily used to generate random usernames,passwords and to make your script more natural,adding random waiting times,of course not limited to thoose,it can be used as anything you can think it as.

VERSION BUILD=7500718 RECORDER=FX
TAB T=1
SET !ERRORIGNORE YES
SET !EXTRACT_TEST_POPUP NO
URL GOTO=http://www.inteldrill.com/random.html
TAG POS=1 TYPE=INPUT:TEXT ATTR=ID:true-random-integer-generator-min CONTENT=[Minimum-random-number]
TAG POS=1 TYPE=INPUT:TEXT ATTR=ID:true-random-integer-generator-max CONTENT=Maximum-random-number
TAG POS=1 TYPE=INPUT:BUTTON ATTR=ID:true-random-integer-generator-button
WAIT SECONDS=1
TAG POS=1 TYPE=SPAN ATTR=ID:true-random-integer-generator-result&&TXT:* EXTRACT=TXT
SET !VAR1 {{!EXTRACT}}
SET !EXTRACT NULL
‘Use {{!VAR1}} (like a number) in where you want your random number to appear.

Just change bold parts into your wish and give it a go.You will probably understand how it works and how you can integrate into your script after that.Any problems,i am always checking comments and i can help you if you just leave a comment.

A example how i use this,to use as random waiting time,i add this line to the script above,limiting it between 60 and 600 so it will wait at least 1 min,and at most 10 min.
WAIT SECONDS={{!VAR1}}
See,just think it will be replaced with a number when script runs and you’re good to go.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>