I have this code:
VERSION BUILD=7601105 RECORDER=FX
SET !TIMEOUT_PAGE 10
SET !ERRORIGNORE YES
TAB T=1
CMDLINE !DATASOURCE tags.csv
SET !DATASOURCE_COLUMNS 1
SET !DATASOURCE_LINE {{!LOOP}}
SET !VAR1 {{!LOOP}}
'***** enter all hashtags and likes here
'1
URL GOTO=http://web.stagram.com/tag/{{!COL1}}/
WAIT SECONDS=5
TAG POS={{!LOOP}} TYPE=IMG ATTR=SRC:http://cdn.stagram.com/img/like.png
WAIT SECONDS=2
TAG POS={{!LOOP}} TYPE=IMG ATTR=SRC:http://cdn.stagram.com/img/like.png
WAIT SECONDS=2
TAG POS={{!LOOP}} TYPE=IMG ATTR=SRC:http://cdn.stagram.com/img/like.png
WAIT SECONDS=2
TAG POS={{!LOOP}} TYPE=IMG ATTR=SRC:http://cdn.stagram.com/img/like.png
WAIT SECONDS=2
TAG POS={{!LOOP}} TYPE=IMG ATTR=SRC:http://cdn.stagram.com/img/like.png
WAIT SECONDS=2
TAG POS={{!LOOP}} TYPE=IMG ATTR=SRC:http://cdn.stagram.com/img/like.png
WAIT SECONDS=2
TAG POS={{!LOOP}} TYPE=IMG ATTR=SRC:http://cdn.stagram.com/img/like.png
WAIT SECONDS=2
TAG POS={{!LOOP}} TYPE=IMG ATTR=SRC:http://cdn.stagram.com/img/like.png
WAIT SECONDS=2
TAG POS={{!LOOP}} TYPE=IMG ATTR=SRC:http://cdn.stagram.com/img/like.png
WAIT SECONDS=2
TAG POS={{!LOOP}} TYPE=IMG ATTR=SRC:http://cdn.stagram.com/img/like.png
WAIT SECONDS=2
See how all the links are the same, I want to loop 10 times to the next link in the same url instead of having to copy/paste the TAG POS command 10 times.
Thanks!!!
Typically these fields are used for uploading files. However, iMacros can fill these fields with the TAG command automatically. More details, including how to record such a command, can be found in Demo-Upload . Note: File upload is not yet available in iMacros for Firefox Quantum due to browser limitations.
The !LOOP variable is especially useful together with the POS attribute of the TAG command for iterating over elements on a page, e.g. search result links. You can also explicitly SET a value for !LOOP at the beginning of the macro to force a different starting value (the default value is 1).
Then we hardcode the two macros being used as shown below and assign it a javascript variable, inside the loop iimplay () is a javascript function that can run imacros code. so we run (macroStart)"check next button" to check if next still exists. The function iimGetLastExtract () will get the last extracted value from the code.
By default the CONTENT parameter of TYPE=SELECT stores the value of the option, if that is available. Otherwise, iMacros uses the the display name of the chosen option. The third possibility is the position in the list (also called index) of the selected value.
you can't do this with regular imacros, but you can with jaavscript version. something like this:
var macro;
macro = "CODE:";
macro += "TAG POS={{i}} TYPE=IMG ATTR=SRC:http://cdn.stagram.com/img/like.png" + "\n";
macro += "WAIT SECONDS=2" + "\n";
for(i=1;i<=10;i++){
iimSet("i",i);
iimPlay(macro);
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With