safeenaat1
Regular Member
- Aug 20, 2013
- 246
- 21
No problem
For everything after the first line, all you'd have to do is change this number to the thread you want to click on
EVENT TYPE=CLICK SELECTOR="HTML>BODY>DIV>TABLE:nth-of-type(2)>TBODY>TR:nth-of-type(5)>TD>B:nth-of-type(2)>A" BUTTON=0
Being that it's a forum and new posts push down the old ones you should start at the bottom and work your way up so you're not overlapping anything
Code:SET !ERRORIGNORE YES TAB T=1 URL GOTO=http://www.nairaland.com/topics SET !VAR1 {{!URLCURRENT}} TAB T=1 WAIT SECONDS=1 EVENT TYPE=CLICK SELECTOR="HTML>BODY>DIV>TABLE:nth-of-type(2)>TBODY>TR:nth-of-type(5)>TD>B:nth-of-type(2)>A" BUTTON=0 WAIT SECONDS=1 TAG POS=1 TYPE=B ATTR=TXT:Reply WAIT SECONDS=1 TAG POS=1 TYPE=TEXTAREA FORM=ID:postform ATTR=ID:body CONTENT=nice<SP>post WAIT SECONDS=1 TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:postform ATTR=NAME:follow CONTENT=NO WAIT SECONDS=1 TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:postform ATTR=* WAIT SECONDS=1 TAG POS=1 TYPE=A ATTR=TXT:New WAIT SECONDS=1 URL GOTO={{!VAR1}} WAIT SECONDS=1 EVENT TYPE=CLICK SELECTOR="HTML>BODY>DIV>TABLE:nth-of-type(2)>TBODY>TR:nth-of-type(4)>TD>B:nth-of-type(2)>A" BUTTON=0 WAIT SECONDS=1 TAG POS=1 TYPE=B ATTR=TXT:Reply WAIT SECONDS=1 TAG POS=1 TYPE=TEXTAREA FORM=ID:postform ATTR=ID:body CONTENT=nice<SP>post WAIT SECONDS=1 TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:postform ATTR=NAME:follow CONTENT=NO WAIT SECONDS=1 TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:postform ATTR=* WAIT SECONDS=1 TAG POS=1 TYPE=A ATTR=TXT:New WAIT SECONDS=1 URL GOTO={{!VAR1}} WAIT SECONDS=1 EVENT TYPE=CLICK SELECTOR="HTML>BODY>DIV>TABLE:nth-of-type(2)>TBODY>TR:nth-of-type(3)>TD>B:nth-of-type(2)>A" BUTTON=0 WAIT SECONDS=1 TAG POS=1 TYPE=B ATTR=TXT:Reply WAIT SECONDS=1 TAG POS=1 TYPE=TEXTAREA FORM=ID:postform ATTR=ID:body CONTENT=nice<SP>post WAIT SECONDS=1 TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:postform ATTR=NAME:follow CONTENT=NO WAIT SECONDS=1 TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:postform ATTR=* WAIT SECONDS=1 TAG POS=1 TYPE=A ATTR=TXT:New WAIT SECONDS=1 URL GOTO={{!VAR1}} WAIT SECONDS=1 EVENT TYPE=CLICK SELECTOR="HTML>BODY>DIV>TABLE:nth-of-type(2)>TBODY>TR:nth-of-type(2)>TD>B:nth-of-type(2)>A" BUTTON=0 WAIT SECONDS=1 TAG POS=1 TYPE=B ATTR=TXT:Reply WAIT SECONDS=1 TAG POS=1 TYPE=TEXTAREA FORM=ID:postform ATTR=ID:body CONTENT=nice<SP>post WAIT SECONDS=1 TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:postform ATTR=NAME:follow CONTENT=NO WAIT SECONDS=1 TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:postform ATTR=* WAIT SECONDS=1 TAG POS=1 TYPE=A ATTR=TXT:New WAIT SECONDS=1 URL GOTO={{!VAR1}} WAIT SECONDS=1 EVENT TYPE=CLICK SELECTOR="HTML>BODY>DIV>TABLE:nth-of-type(2)>TBODY>TR>TD>B:nth-of-type(2)>A" BUTTON=0 WAIT SECONDS=1 TAG POS=1 TYPE=B ATTR=TXT:Reply WAIT SECONDS=1 TAG POS=1 TYPE=TEXTAREA FORM=ID:postform ATTR=ID:body CONTENT=nice<SP>post WAIT SECONDS=1 TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:postform ATTR=NAME:follow CONTENT=NO WAIT SECONDS=1 TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:postform ATTR=* WAIT SECONDS=1 TAG POS=1 TYPE=A ATTR=TXT:New WAIT SECONDS=1
Cheers
So practically what you want to do is select random lines from a source file? This can be done with the scripting interface of iMacros: http://forum.imacros.net/viewtopic.php?f=2&t=5802. I have never used that one though, so i can't really help with that, but maybe that one is the easiest or shortest way to do it.
But there's always a workaround.
I see i replied a few times back then and one of the replies contains vital info to this solution too.
I figured out a backwards solution, we don't pick random lines from the data source, but we randomize the data source with each loop, so we will have a random username and content (whatever that means in this case, let's say the content is comments) to use with each loop.
I put this macro together quick:
You need to put the usernames (line 7) and the comments (line 11) into spintax format. Play the macro in loop.HTML:VERSION BUILD=8970419 RECORDER=FX TAB T=1 TAB CLOSEALLOTHERS SET !ERRORIGNORE YES SET !EXTRACT_TEST_POPUP NO URL GOTO=http://freespinner.net/ TAG POS=1 TYPE=TEXTAREA FORM=ID:demoForm ATTR=ID:spin Content={username01|username02|username03|username04|username05|username06|username07|username08|username09|username10} TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:demoForm ATTR=ID:submit TAG POS=1 TYPE=DIV ATTR=ID:clip_text0 EXTRACT=TXT REFRESH TAG POS=1 TYPE=TEXTAREA FORM=ID:demoForm ATTR=ID:spin Content={comment01|comment02|comment03|comment04|comment05|comment06|comment07|comment08|comment09|comment10} TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:demoForm ATTR=ID:submit TAG POS=1 TYPE=DIV ATTR=ID:clip_text0 EXTRACT=TXT SAVEAS TYPE=EXTRACT FOLDER=* FILE=random_username+random_comment.csv TAG POS=1 TYPE=DIV ATTR=ID:clip_text1 EXTRACT=TXT SET !DATASOURCE c:\Users\YourWindowsUsername\Documents\iMacros\Downloads\random_username+random_comment.csv SET !LOOP 1 SET !DATASOURCE_LINE {{!LOOP}}
Note: if the comments contain empty spaces, you need to replace every empty space with <SP>
What this macro does: spins the usernames, comments and extracts them into a .csv file into your iMacros\Downloads folder. One username and one comment per line. New data is appended to the existing data with each loop.
E.g. the .csv file with the extracted data will look like this after 2 loops:
username03;comment07
username09;comment04
LOOP 1 spins the 10 usernames and 10 comments, extracts a random username and a random comment into the 1st line of the .csv. LOOP 1 will use the 1st line of the .csv as data source.
LOOP 2 spins the 10 usernames and 10 comments, extracts a random username and a random comment into the 2nd line of the .csv. LOOP 2 will use the 2nd line of the .csv as data source.
And so on.
Usernames are under COL1, comments are under COL2, the password you said is the same for all accounts, so that can be entered manually into the appropriate part of the login process.
bro thanks very much for this great response. more respects bro. example in the above script if i want each account to make only 2 comments, then logout for the other account to continue, does it mean that i will have to repeat the script and make it very long with loggin n logout after every 2 comments?