imacros experts?

valmik

Junior Member
Joined
Feb 3, 2016
Messages
107
Reaction score
3
how to count no of line if excel sheet in imacros? plz help
 
Edit* I think I understand:
If you're trying to implement control-flow/utilization conditional statements(such as: if/else/etc), you'd need to implement JavaScript or some type of programming language to invoke your imacros that way; which, requires the full-version of imacros; which, you can get here: www(dot)blackhatworld(dot)com/blackhat-seo/black-hat-seo-tools/575566-get-imacros-9-0-enterprise-edition-unleash-automation(dot)html
which, if you plan to go that route, i recommend looking into this:
http: //forum.imacros.net/viewtopic(dot)php?t=13610
// -----------------------

Otherwise, this is bout the only thing I can think of you could implement without conditional statements:

This assigns the location of the .csv file (or .txt / whatever extension you have)
Code:
[COLOR=#ff8c00]SET !DATASOURCE C:\Users\userName\Desktop\iMacros\excelfile.csv
SET !LOOP 1 'this being the (x/vertical) column number that it's started on[/COLOR]
' SET !LOOP 2 would put it on the second line- and so forth |1|2|3|etc.[COLOR=#ff8c00]

[/COLOR]'Increase the current position in the file with each loop [COLOR=#ff8c00]
SET !DATASOURCE_LINE {{!LOOP}}[/COLOR]

Code:
[COLOR=#ff8c00]TAG POS=1 TYPE=TEXTAREA FORM=ACTION:/api/comments ATTR=CLASS:"form-control" CONTENT={{!COL2}}[/COLOR]
'!COL2 is the second (y / horizontal) column value.
'you could choose !COL1 or !COL2 or !COL3 /etc
'so:
'1
'2
'3
'etc:
[COLOR=#ff8c00]TAG POS=1 TYPE=INPUT:SUBMIT FORM=ACTION:/api/comments ATTR=NAME:submit[/COLOR]
 
Last edited:
LOOP 1 is line 1, LOOP 2 is line 2

!SET LOOP 1
'the macro starts with the 1st line of your datasource file'

!SET LOOP 33
'the macro starts with the 33rd line of your datasource file'

also when you play a macro in loop, pay attention that you type the correct number into the loop counter box or else it won't loop correctly, if you have 50 lines in your datasource file and want to loop through the whole file starting from 1 to 50, then SET !LOOP1 and put 50 in the loop counter box, if you want to start from the 15th line and loop until the 36th line, then SET !LOOP 15 and put 36 in the loop counter box
 
Back
Top