iMacro to generate random text or random number

random number from 1 to 10

TAB T=1
URL GOTO=https://www.google.com.au/
SET !VAR1 EVAL("var randomNumber=Math.floor(Math.random()*10 + 1); randomNumber;")
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:gbqf ATTR=ID:gbqfq CONTENT={{!var1}}

You can generate a random string similar to the above solution with a slight modification. No need to read files or anything else if you simply want a random string with some specific length. It's a bit messy but it does the job

SET !VAR1 EVAL("var letters = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','w','x','y','z']; var string = ''; for(var i = 0; i < 10; i++){string += letters[parseInt(Math.random() * 25)]}; string")

Tags:

Random

Imacros