I have the scripting edition, and I am using a macro to submit emails to a site. I need to have a variable that will delay 15-30 seconds between submit. Currently I use the command WAIT SECONDS=X where 'x' is the number of seconds I put in.
I need it to be a variable, instead of a specific number. How can I do this?
here's the simple script I'm using to submit emails:
VERSION BUILD=6900210
TAB T=1
TAB CLOSEALLOTHERS
URL GOTO=(the website link is here)
CMDLINE !DATASOURCE book1.csv
SET !DATASOURCE_COLUMNS 1
SET !LOOP 2
SET !DATASOURCE_LINE {{!LOOP}}
TAG POS=1 TYPE=INPUT:TEXT FORM=ACTIONrocessleads.php ATTR=ID:fname CONTENT=
TAG POS=1 TYPE=INPUT:TEXT FORM=ACTIONrocessleads.php ATTR=ID:email CONTENT={{!COL1}}
WAIT SECONDS=5 <-- this is where I need a variable function
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ACTIONrocessleads.php ATTR=VALUE:Submit
I dont know how to make it random, but what I can do is create another column and set the random number from 15-30 seconds and do like this
WAIT SECONDS={{!COL#}}
that is the easy way to do it.. the hard way, I dont know how to do it.. like go to the random generator site etc etc
http://linkidol.com/2010/02/19/imacros-random-number-generator/
any yahoomail macros?
i have been trying to create the macros but it always failed...after click signup the page that appear is the front yahoo.com not the yahoomail registration confirmation page as it should..
That's a good suggestion...only problem is that when it stalls, i dont know how many emails it has entered, and so I dont know how to tell it to start where it left off.
I think the way to do it is to stay in the current macro, but somehow tell it to retry and/or increase the timeout timer....
anyone know what command tells it to retry loading a webpage if timeout??
'---- {{mynumber}} should be placed on the SET !DATASOURCE_LINE or SET !LOOP in your macro ----
'---- {{time}} should be placed on the SET !TIMEOUT line in your macro ----
Dim x
Dim time
x = 1
Set iim1 = CreateObject("imacros")
Do until x = 6
time = 15
'---- Running Imacro script ----
iret = iim1.iimInit("",TRUE)
'---- x is the custom loop variable for the macro ----
iret = iim1.iimSet("-var_mynumber", x)
iret = iim1.iimSet("-var_time", time)
iret = iim1.iimDisplay("name_displayed")
iplay = iim1.iimPlay("name_of_macro")
'---- Checking imacro for errors & 2nd attempt at running the macro with same loop variable ----
If iplay < 0 Then
'---- This will increase the timeout variable by 15 seconds everytime imacro encounters an error. ----
time = time + 15
iret = iim1.iimSet("-var_mynumber", x)
iret = iim1.iimSet("-var_time", time)
iret = iim1.iimDisplay("name_displayed")
iplay = iim1.iimPlay("name_of_macro")
Else
x = x + 1
End If
Loop
iret = iim1.iimExit
WScript.Quit(0)
VERSION BUILD=6861208
TAB T=1
TAB CLOSEALLOTHERS
URL GOTO=https://www.hushmail.com/signup/
'New page loaded
CMDLINE !DATASOURCE data.csv
'Number of columns in the CSV file. This must be accurate!
SET !DATASOURCE_COLUMNS 2
'Start at line 2 to skip the header in the file
SET !LOOP 20
'Increase the current position in the file with each loop
SET !DATASOURCE_LINE {{!LOOP}}
SET !EXTRACT_TEST_POPUP NO
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:newaccountform ATTR=NAME:hush_username CONTENT={{!COL1}}
TAG POS=1 TYPE=INPUT:PASSWORD FORM=NAME:newaccountform ATTR=NAME:hush_pass1 CONTENT={{!COL2}}
TAG POS=1 TYPE=INPUT:PASSWORD FORM=NAME:newaccountform ATTR=NAME:hush_pass2 CONTENT={{!COL2}}
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=NAME:newaccountform ATTR=ID:hush_tos&&VALUE:on CONTENT=YES
PROMPT Fill<SP>that<SP>captcha<SP>yo !VAR1
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:newaccountform ATTR=NAME:hush_turing_response CONTENT={{!VAR1}}
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=NAME:newaccountform ATTR=ID:hush_additional_tos&&VALUE:on CONTENT=YES
TAG POS=1 TYPE=INPUT:SUBMIT FORM=NAME:newaccountform ATTR=ID:createKeysButton
WAIT SECONDS=#DOWNLOADCOMPLETE#
'New page loaded
ADD !EXTRACT {{!COL1}}
ADD !EXTRACT {{!COL2}}
SAVEAS TYPE=EXTRACT FOLDER=* FILE=*
TAG POS=1 TYPE=INPUT:SUBMIT FORM=NAME:signInForm ATTR=VALUE:To<SP>sign<SP>in<SP>now,<SP>click<SP>here
CLEAR
'New page loaded
URL GOTO=http://www.facebook.com/
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:reg ATTR=ID:firstname CONTENT=[COLOR=Red]firstname[/COLOR]
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:reg ATTR=ID:lastname CONTENT=[COLOR=Red]lastname[/COLOR]
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:reg ATTR=ID:reg_email__ CONTENT=[COLOR=Red][email protected][/COLOR]
SET !ENCRYPTION NO
TAG POS=1 TYPE=INPUT:PASSWORD FORM=NAME:reg ATTR=ID:reg_passwd__ CONTENT=[COLOR=Red]password[/COLOR]
'sex: 1 is female 2 is male, keep the % symbol
TAG POS=1 TYPE=SELECT FORM=NAME:reg ATTR=ID:sex CONTENT=%[COLOR=Red]1[/COLOR]
'birthmonth is 3 letters ex. Jan for January, keep the % symbol
TAG POS=1 TYPE=SELECT FORM=NAME:reg ATTR=ID:birthday_month CONTENT=%[COLOR=Red]Nov[/COLOR]
'birthday_day is 1 number, keep the % symbol
TAG POS=1 TYPE=SELECT FORM=NAME:reg ATTR=ID:birthday_day CONTENT=%[COLOR=Red]15[/COLOR]
'birthyear is 1 number, keep the % symbol
TAG POS=1 TYPE=SELECT FORM=NAME:reg ATTR=ID:birthday_year CONTENT=%[COLOR=Red]1955[/COLOR]
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:reg ATTR=VALUE:Sign<SP>Up
PROMPT Please<SP>Enter<SP>Captcha<SP>Code: !VAR1
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:reg ATTR=ID:captcha_response CONTENT={{!VAR1}}
TAG POS=2 TYPE=INPUT:SUBMIT FORM=ID:reg ATTR=VALUE:Sign<SP>Up