IMacros Question

kegnum

Senior Member
Joined
May 13, 2009
Messages
1,156
Reaction score
608
First off, I'm really sorry if I posted this is the wrong section... Wasn't sure where to put it.

This is a question for anyone who is at all familiar with IMacros...

I am running IMacros 6.7.0.1 for firefox. Please bare with me as I am a total "noob".

This is what I am trying to do... I'm hoping there is someone here who can help me out.

I have a text file with a list of a few hundred urls. All I want is Imacros to extract the first url, delete it and open it up an a new tab and then loop.

The macro should open the urls in new tabs one at a time. Delete the url from the text file that way the newest url is first on the list.

Any help would be much appreciated.
 
You don't need to delete the first line in the file. There is loop for that. It grabs new line each loop. For example on step 5 of the loop it takes 5th line.
Put your urls in file c:\txt and press "Play (loop)". Set "Max" 100 for starters.
SET !ERRORIGNORE YES
SET !DATASOURCE c:\urls.txt
SET !LOOP 1
SET !DATASOURCE_COLUMNS 1
SET !DATASOURCE_LINE {{!LOOP}}
TAB OPEN
TAB T={{!LOOP}}
URL GOTO={{!COL1}}
 
You don't need to delete the first line in the file. There is loop for that. It grabs new line each loop. For example on step 5 of the loop it takes 5th line.
Put your urls in file c:\txt and press "Play (loop)". Set "Max" 100 for starters.

don't open 100 tab at time.. it will hang ..

try to open one or 10 and close first then go for further..
 
add WAIT 10s command to delay between loops (it's 10 seconds here)
 
Thanks for the help... I really need it to delete the line in a text file though. The reason being is that I am using it to manually go through a list of thousands of urls. I won't be doing this in a day so If the line doesn't delete after it has been opened the next time I continue going through the list it will start from the beginning.

So what i need is for the script to open a url from the first line of a text file and then delete that line.


You don't need to delete the first line in the file. There is loop for that. It grabs new line each loop. For example on step 5 of the loop it takes 5th line.
Put your urls in file c:\txt and press "Play (loop)". Set "Max" 100 for starters.
 
iMacros cannot delete stuff from files, so you'll have to come up with a different approach.

If you're just opening sites in a new tab I would let it run until it was done. I've had Firefox with iMacros running for days on end. Or, you can break up the URL file into smaller files and then do them in smaller batches.

Keep in mind that you don't have to start at the beginning of a datasource list. For example, if you did 100 URLs one day, then the next day you could edit your macro to !SET LOOP 101, where it would start at line 101.

If you're just extracting content from webpages you may find it easier and faster to use a PHP/cURL solution instead of iMacros.
 
Thanks for all the help guys!
 
iMacros cannot delete stuff from files, so you'll have to come up with a different approach.

If you're just opening sites in a new tab I would let it run until it was done. I've had Firefox with iMacros running for days on end. Or, you can break up the URL file into smaller files and then do them in smaller batches.

Keep in mind that you don't have to start at the beginning of a datasource list. For example, if you did 100 URLs one day, then the next day you could edit your macro to !SET LOOP 101, where it would start at line 101.

If you're just extracting content from webpages you may find it easier and faster to use a PHP/cURL solution instead of iMacros.

In this code :

SET !ERRORIGNORE YES
SET !DATASOURCE c:\urls.txt
SET !LOOP 1
SET !DATASOURCE_COLUMNS 1
SET !DATASOURCE_LINE {{!LOOP}}
TAB OPEN
TAB T={{!LOOP}}
URL GOTO={{!COL1}}

If i change SET !LOOP 1 to SET !LOOP 51. Which I did after I opened 50 sites.. It doesnt work. The reason is that the script can't find tab 51 because of line 7 TAB T={{!LOOP}}...

Any thoughts...
 
F*ck it.. I made something that works using a batch file :P Thanks again for all the help guys!
 
In this code :

SET !ERRORIGNORE YES
SET !DATASOURCE c:\urls.txt
SET !LOOP 1
SET !DATASOURCE_COLUMNS 1
SET !DATASOURCE_LINE {{!LOOP}}
TAB OPEN
TAB T={{!LOOP}}
URL GOTO={{!COL1}}

If i change SET !LOOP 1 to SET !LOOP 51. Which I did after I opened 50 sites.. It doesnt work. The reason is that the script can't find tab 51 because of line 7 TAB T={{!LOOP}}...

Any thoughts...

I used this code but not working

i want load urls list from txt file one by one

any help me

thanks
 
I used this code but not working

i want load urls list from txt file one by one

any help me

thanks
not sure what do you try to achieve exactly
do you want to load url1 in loop 1, url2 in loop 2, url3 in loop 3 and so on? and do you want these to load in tab 1 one-by-one each in its own loop or on different tabs, next to each other in the same loop, so w/o looping basically?
 
not sure what do you try to achieve exactly
do you want to load url1 in loop 1, url2 in loop 2, url3 in loop 3 and so on? and do you want these to load in tab 1 one-by-one each in its own loop or on different tabs, next to each other in the same loop, so w/o looping basically?

yes,

Example (open first url after 15 Seconds open another url ... Etc.) but load urls from text file

Note: 1 tab only

thanks
 
yes,

Example (open first url after 15 Seconds open another url ... Etc.) but load urls from text file

Note: 1 tab only

thanks
if that's all you want, this should work:
HTML:
SET !ERRORIGNORE YES
SET !DATASOURCE c:\urls.txt
SET !LOOP 1
SET !DATASOURCE_COLUMNS 1
SET !DATASOURCE_LINE {{!LOOP}}
TAB T=1
URL GOTO={{!COL1}}
WAIT SECONDS=15
put the urls into the .txt file, one per each line and save the .txt in UTF-8 coding into the root of your c: drive, if you save it elsewhere, then alter the code (if you fail to save the macro in UTF-8 coding, it might not run at all, we set errorignore to yes, so it would just stop w/o telling you exactly why)
 
if that's all you want, this should work:
HTML:
SET !ERRORIGNORE YES
SET !DATASOURCE c:\urls.txt
SET !LOOP 1
SET !DATASOURCE_COLUMNS 1
SET !DATASOURCE_LINE {{!LOOP}}
TAB T=1
URL GOTO={{!COL1}}
WAIT SECONDS=15
put the urls into the .txt file, one per each line and save the .txt in UTF-8 coding into the root of your c: drive, if you save it elsewhere, then alter the code (if you fail to save the macro in UTF-8 coding, it might not run at all, we set errorignore to yes, so it would just stop w/o telling you exactly why)

thank you it's working
 
if that's all you want, this should work:
HTML:
SET !ERRORIGNORE YES
SET !DATASOURCE c:\urls.txt
SET !LOOP 1
SET !DATASOURCE_COLUMNS 1
SET !DATASOURCE_LINE {{!LOOP}}
TAB T=1
URL GOTO={{!COL1}}
WAIT SECONDS=15
put the urls into the .txt file, one per each line and save the .txt in UTF-8 coding into the root of your c: drive, if you save it elsewhere, then alter the code (if you fail to save the macro in UTF-8 coding, it might not run at all, we set errorignore to yes, so it would just stop w/o telling you exactly why)

Hi HoNeYBiRD . I need something like that ,but after load all urls from the text file it will wait 60s and loop url again from the start.
After loop about random 8-10 times, each url can click exactly 1 position (CLICK X=n Y=m)
Example : open first url after 15 Seconds open another url ... Etc. load urls from text file, at the end wait 60s. Loop the same about 8 times ( or random 8-10 times if possible ) and next loop will be like this :
- Open first url , click 1 position CLICK X=n Y=m , wait 15 seconds, open next url and action with same position like the fisrt .
Could you help me ? if it possible ? thank you very much
 
Last edited:
Back
Top