Insert Missing Steps

From iMacros
Jump to: navigation, search

As the iMacros macros are simple text files, you can add steps by copy&paste. Here's an example:


The Initial Macro

We want to automate a form (in this case it is http://www.iopus.com/imacros/demo/v6/f1/form.asp):

The initial recording

The inital recording yields the following macro

VERSION BUILD=6200707     
TAB T=1     
TAB CLOSEALLOTHERS     
URL GOTO=http://www.iopus.com/imacros/demo/v6/f1/form.asp     
TAG POS=1 TYPE=SELECT FORM=NAME:TestForm ATTR=NAME:main CONTENT=2 
TAG POS=1 TYPE=SELECT FORM=NAME:TestForm ATTR=NAME:drink CONTENT=2 
TAG POS=1 TYPE=SELECT FORM=NAME:TestForm ATTR=NAME:dessert CONTENT=1 
TAG POS=1 TYPE=TEXTAREA FORM=NAME:TestForm ATTR=NAME:Remarks CONTENT=Thanks<SP>a<SP>lot. 
TAG POS=1 TYPE=INPUT:SUBMIT FORM=NAME:TestForm ATTR=NAME:SendButton  
'New page loaded  

The Missing Step

Now we find that we missed recording the drink size. In order to add it, we record this single step which results in the following macro:

Recording the missing step
VERSION BUILD=6200707     
TAB T=1     
TAB CLOSEALLOTHERS     
URL GOTO=http://www.iopus.com/imacros/demo/v6/f1/form.asp     
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=NAME:TestForm ATTR=NAME:C8&&VALUE:ON CONTENT=YES 

The New Macro

Inserting the new step, we get the new, complete form filling macro:

VERSION BUILD=6200707     
TAB T=1     
TAB CLOSEALLOTHERS     
URL GOTO=http://www.iopus.com/imacros/demo/v6/f1/form.asp     
TAG POS=1 TYPE=SELECT FORM=NAME:TestForm ATTR=NAME:main CONTENT=2 
TAG POS=1 TYPE=SELECT FORM=NAME:TestForm ATTR=NAME:drink CONTENT=2 
'here's the new step
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=NAME:TestForm ATTR=NAME:C8&&VALUE:ON CONTENT=YES 
'the old macro continues
TAG POS=1 TYPE=SELECT FORM=NAME:TestForm ATTR=NAME:dessert CONTENT=1 
TAG POS=1 TYPE=TEXTAREA FORM=NAME:TestForm ATTR=NAME:Remarks CONTENT=Thanks<SP>a<SP>lot. 
TAG POS=1 TYPE=INPUT:SUBMIT FORM=NAME:TestForm ATTR=NAME:SendButton  
'New page loaded