Imacros SHARED code scripts

Code to change IP on a Netgear router.

Code:
SET !VAR1 0
URL GOTO=http://192.168.1.1
SET !ENCRYPTION NO
ONLOGIN USER=admin PASSWORD=password
URL GOTO=http://192.168.1.1
FRAME F=5
TAG POS=1 TYPE=INPUT:SUBMIT FORM=NAME:formname ATTR=NAME:apply&&VALUE:Apply
WAIT SECONDS={{!VAR1}}

You can edit !VAR1 to make your IP change repeatedly when the macro is looped.
 
Code to change IP on a Netgear router.

Code:
SET !VAR1 0
URL GOTO=http://192.168.1.1
SET !ENCRYPTION NO
ONLOGIN USER=admin PASSWORD=password
URL GOTO=http://192.168.1.1
FRAME F=5
TAG POS=1 TYPE=INPUT:SUBMIT FORM=NAME:formname ATTR=NAME:apply&&VALUE:Apply
WAIT SECONDS={{!VAR1}}
You can edit !VAR1 to make your IP change repeatedly when the macro is looped.

Haven't been following this thread regularly but I have to thank you for this bit. Even though I primarily use Linksys, this puts me on the right track to go record my imacros for Linksys too. Just had not thought of it until you posted this. Thanks!
 
How can i set it to do a job at a certain replay speed i only have fast, medium, slow?? I need it to be a little slower than fast but not medium. Thank.
 
How can i set it to do a job at a certain replay speed i only have fast, medium, slow?? I need it to be a little slower than fast but not medium. Thank.

The way I slow mine down at certain spots where it seems to go to fast, or has to wait for a page element or form fields to load or something is I put in a "wait" line like this:
WAIT SECONDS=1
 
My problem is I have a function in my app that makes the macro, adds it to a string, then saves it to the db but when it comes to playing the macro, (imacros)

The imacros player instead opens the macro with a name that represents the macro string and fails

Anybody got a clue?

stuck in imacros hell currently
 
Here's a script that scrapes ezinearticles. Use something like neta1o's scraper to first scrape required article ids (its free btw).

I've included extensive comments for the sake of understanding.

HTML:
VERSION BUILD=6000328     
TAB T=1     
TAB CLOSEALLOTHERS 
'
SET !EXTRACT_TEST_POPUP NO
'
'Specify the csv with only one column containing article ids only.
CMDLINE !DATASOURCE artid.csv
'
'Number of columns in the CSV file. This must be accurate!
SET !DATASOURCE_COLUMNS 1
'
'Start at line 1 if you do not want to skip the header in the file
SET !LOOP 1
'
'Increase the current position in the file with each loop 
SET !DATASOURCE_LINE {{!LOOP}}  
'
'Go to a url that caters for easy extraction
URL GOTO=http://ezinearticles.com/ezinepublisher/?id={{!COL1}}
'
'Extract the Article Title in Column 1
TAG POS=1 TYPE=TITLE ATTR=* EXTRACT=TXT
'
'Extract Article Summary in Column 2
TAG POS=1 TYPE=TEXTAREA FORM=NAME:NoFormName ATTR=ID:article-summary EXTRACT=TXT
'
'Extract Article Keywords in Column 3
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:NoFormName ATTR=ID:article-keywords EXTRACT=TXT
'
'Go to a URL to extract article html code and resource box
URL GOTO=http://ezinearticles.com/{{!COL1}}
'
'This extracts article body html (without resource box)
TAG POS=1 TYPE=DIV ATTR=ID:body&&TXT:* EXTRACT=HTM
'Note: You need to remove the div tags rapped around the article above
'
'Extracting resource box can be useless but below is the code
TAG POS=1 TYPE=DIV ATTR=ID:sig&&TXT:* EXTRACT=HTM
'
'Extract original article url for records
ADD !EXTRACT {{!URLCURRENT}}
'
'Save the file (I've no idea how to name the file!)
'This will create extract.csv in downloads
'
SAVEAS TYPE=EXTRACT

Uses?
- Create further macros to submit these articles to web 2.0 sites etc.
- Use this as an example to see how extract tags work.


Thanks for the script but it doesn't really work out for me.

I just need the body of the article extracted as .txt.
Can you help me out bro?
 
this is so great, but anyone know where to find great iMacors tutorial :D
 
Code to ignore the error pop-up which causes the macro to stop.

Code:
SET !ERRORIGNORE YES
 
Code to stop images from loading. Very useful for speeding up macros, especially when using slow proxies.

Code:
FILTER TYPE=IMAGES STATUS=ON
 
Cool scripts! Is there any script to:
1.Login to my gmail account
2.Click first unread message in my inbox
3.Click activation link in email and open it in tab 2
4.Click confirm button in tab 2 and close this tab
5.Delete this already read email from inbox and start again with the new unread email.
Any suggestions?
 
Cool scripts! Is there any script to:
1.Login to my gmail account
2.Click first unread message in my inbox
3.Click activation link in email and open it in tab 2
4.Click confirm button in tab 2 and close this tab
5.Delete this already read email from inbox and start again with the new unread email.
Any suggestions?

I am also thinking to make script similar to it...But I can't get any spare minute to do.
 
can somebody help me?

i need to make a database with the url's from community members.

http://www.bsmparty.de/community/suche

so iMacros should make a CSV list like:

hxxp://www.bsmparty.de/user/48016420O136448
hxxp://www.bsmparty.de/user/57620280O138496
...

how does that work with imacros?
 
Cool scripts! Is there any script to:
1.Login to my gmail account
2.Click first unread message in my inbox
3.Click activation link in email and open it in tab 2
4.Click confirm button in tab 2 and close this tab
5.Delete this already read email from inbox and start again with the new unread email.
Any suggestions?

I'm making one like this for twitter activation but I found it hard to do with my webmail accnt for my host (as I'm using that instead of gmail), with doing something like this I found its probably easier to just extract all the emails to text files and parse with a VB script to get the activation urls and then save this to a .csv file and run another imacro script to go through these.. also with twitter its mor complicated because you have to login to your account before you click the activation url.. so thats part of the reason I'm doing it this way too
 
this is so great, but anyone know where to find great iMacors tutorial :D

Their help tutorial is all you should need... if you want to do anything complicated, like conditional statements, etc you need to use "real" programming language to interact with the imacros api, as imacros is only a declarative language
 
If you change the items in red, do you need to change them again for each and every new account, or is there a way to make them random from a csv?

Yahoo: Email Signup

Because you can never get enough email addresses.
Just change the items in Red.

Code:
URL GOTO=https://edit.yahoo.com/registration?.intl=us
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:regFormBody ATTR=ID:firstname CONTENT=[COLOR=red]firstname[/COLOR]
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:regFormBody ATTR=ID:secondname CONTENT=[COLOR=red]lastname[/COLOR]
'm for male, f for female, keep the %
TAG POS=1 TYPE=SELECT FORM=NAME:regFormBody ATTR=ID:gender CONTENT=%[COLOR=red]m[/COLOR]
'month is a number, ex. 2 for February
TAG POS=1 TYPE=SELECT FORM=NAME:regFormBody ATTR=ID:mm CONTENT=%[COLOR=red]month[/COLOR]
'birthday day is a number
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:regFormBody ATTR=ID:dd CONTENT=[COLOR=red]birthday_day[/COLOR]
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:regFormBody ATTR=ID:yyyy CONTENT=[COLOR=red]year[/COLOR]
'country: us is united states, uk is united kindom
TAG POS=1 TYPE=SELECT FORM=NAME:regFormBody ATTR=ID:country CONTENT=%[COLOR=red]us[/COLOR]
'zip code: 5 numbers
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:regFormBody ATTR=ID:postalcode CONTENT=[COLOR=red]ZIP[/COLOR]
'choose the yahoo ID here, the stuff that goes in front of @yahoo.com
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:regFormBody ATTR=ID:yahooid CONTENT=[COLOR=red]YahooID[/COLOR]
SET !ENCRYPTION NO
TAG POS=1 TYPE=INPUT:PASSWORD FORM=NAME:regFormBody ATTR=ID:password CONTENT=[COLOR=red]password[/COLOR]
WAIT SECONDS=2
SET !ENCRYPTION NO
TAG POS=1 TYPE=INPUT:PASSWORD FORM=NAME:regFormBody ATTR=ID:passwordconfirm CONTENT=[COLOR=red]password[/COLOR]
WAIT SECONDS=4
'alternate email address, this doesn't need to be real
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:regFormBody ATTR=ID:altemail CONTENT=[COLOR=red][email protected][/COLOR]
'custom question can be left as is, sometimes these change
TAG POS=1 TYPE=SELECT FORM=NAME:regFormBody ATTR=ID:secquestion CONTENT=%custom
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:regFormBody 
'this question can be anything, keep the quotation marks
ATTR=ID:customsecquestion1 CONTENT="[COLOR=red]What is your favorite movie?[/COLOR]"
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:regFormBody ATTR=ID:secquestionanswer CONTENT=[COLOR=red]Answer1[/COLOR]
'Better to keep it custom, question 2
TAG POS=1 TYPE=SELECT FORM=NAME:regFormBody ATTR=ID:secquestion2 CONTENT=%[COLOR=red]custom[/COLOR]
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:regFormBody ATTR=ID:customsecquestion2 CONTENT="[COLOR=red]What is your favorite rock band?[/COLOR]"
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:regFormBody ATTR=ID:secquestionanswer2 CONTENT=[COLOR=red]Answer2[/COLOR]
PROMPT Enter<SP>Captcha !VAR1
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:regFormBody ATTR=ID:cword CONTENT={{!VAR1}}
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:regFormBody ATTR=ID:IAgreeBtn
WAIT SECONDS=2
'continue button
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:regConfirmBodyFrm ATTR=ID:ContinueBtn
WAIT SECONDS=2
'signout so the next signup is ready
TAG POS=1 TYPE=A ATTR=TXT:Sign<SP>Out
'this wait time can be taken out if your connection is good enough
WAIT SECONDS=5
 
Do you need a column header with the name usernames and one named passwords? I can't get it to go down my list, I have no column names. Do you think that is the problem?



Here's a hushmail signup script.

Make data.csv in datasources with usernames in column1 and passwords in column2.

Code:
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
 
If you change the items in red, do you need to change them again for each and every new account, or is there a way to make them random from a csv?

Hello,

You can try scrapping random name etc at http://www.fakenamegenerator.com then copy them on csv as stated on the script here.

Code:
TAB T=0     
TAB CLOSEALLOTHERS  
FILTER TYPE=IMAGES STATUS=ON 
SET !EXTRACT_TEST_POPUP NO   
URL GOTO=http://www.fakenamegenerator.com
TAG POS=1 TYPE=INPUT:IMAGE FORM=NAME:options ATTR=
WAIT SECONDS=1
TAG POS=1 TYPE=SPAN ATTR=CLASS:given-name&&TXT:* EXTRACT=TXT
WAIT SECONDS=1
TAG POS=1 TYPE=SPAN ATTR=CLASS:family-name&&TXT:* EXTRACT=TXT
WAIT SECONDS=1
TAG POS=27 TYPE=LI ATTR=TXT:* EXTRACT=TXT 
WAIT SECONDS=1
TAG POS=23 TYPE=LI ATTR=TXT:* EXTRACT=TXT
WAIT SECONDS=1
TAG POS=1 TYPE=SPAN ATTR=CLASS:value&&TXT:* EXTRACT=TXT
WAIT SECONDS=1
TAG POS=1 TYPE=SPAN ATTR=CLASS:postal-code&&TXT:* EXTRACT=TXT  
SAVEAS TYPE=EXTRACT FOLDER=C:\data FILE={{!NOW:ddmmyyyy}}
CLEAR
The result would be:
Code:
"Andrew","Manno","Losey ","uiH0IeXoh5 ","[email protected]","22653" 
"George","Child","Jackson ","ete7liCheZ3 ","[email protected]","95113"
Then you can use the result csv to fill the RED value eg in my gmail account creator;
Code:
TAB T=1     
TAB CLOSEALLOTHERS
SET !DATASOURCE gname.csv
SET !DATASOURCE_COLUMNS 5
SET !LOOP 1
SET !DATASOURCE_LINE {{!LOOP}}
TAB OPEN
TAB T=2 
URL GOTO=http://mail.google.com/mail/signup    
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:createaccount ATTR=ID:FirstName CONTENT=[COLOR=Red]{{!COL1}}[/COLOR]
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:createaccount ATTR=ID:LastName CONTENT=[COLOR=Red]{{!COL2}}[/COLOR]
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:createaccount ATTR=ID:Email CONTENT=[COLOR=Red]{{!COL1}}{{!COL2}}{{!COL3}}[/COLOR]
TAG POS=1 TYPE=INPUT:BUTTON FORM=NAME:createaccount ATTR=VALUE:check<SP>availability!  
SET !ENCRYPTION NO
TAG POS=1 TYPE=INPUT:PASSWORD FORM=NAME:createaccount ATTR=ID:Passwd CONTENT=[COLOR=Red]{{!COL4}}[/COLOR]
TAG POS=1 TYPE=INPUT:PASSWORD FORM=NAME:createaccount ATTR=ID:PasswdAgain CONTENT=[COLOR=Red]{{!COL4}}[/COLOR]
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=NAME:createaccount ATTR=ID:PersistentCookie CONTENT=NO
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=NAME:createaccount ATTR=ID:smhck CONTENT=NO
TAG POS=1 TYPE=SELECT FORM=NAME:createaccount ATTR=ID:questions CONTENT=4 
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:createaccount ATTR=ID:IdentityAnswer CONTENT=[COLOR=Red]{{!COL3}}[/COLOR]
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:createaccount ATTR=ID:SecondaryEmail CONTENT= 
TAG POS=1 TYPE=IMG ATTR=ALT:Visual<SP>verification  
PROMPT Please<SP>enter<SP>security<SP>code: !VAR1
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:createaccount ATTR=ID:newaccountcaptcha CONTENT={{!VAR1}}
TAG POS=1 TYPE=SELECT FORM=NAME:createaccount ATTR=ID:loc CONTENT=138
TAG POS=1 TYPE=INPUT:SUBMIT FORM=NAME:createaccount ATTR=ID:submitbutton 
WAIT SECONDS=10
 
Last edited:
Back
Top