Extract URL to .csv and URL GOTO={{COL#}} isn't working

Discussions and Tech Support related to the iMacros Firefox Add-on, including the built-in Javascript scripting interface for playing .js files.

Moderators: Community Moderators, iMacros Moderators

Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the Google search box (at the top of each forum page) to see if a similar problem or question has already been addressed. This will search the entire contents of the forums as well as the iMacros Wiki.
3. We can respond much faster to your posts if you include the following information:

CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST

Answering your own posts (e.g. attempting to "bump" your topic) drops your topic from the list of unanswered threads, so it may actually receive less views.

Extract URL to .csv and URL GOTO={{COL#}} isn't working

by frankhack1 on Sat Jul 23, 2011 1:09 pm

Hi!
I'm trying to extract 9 url from 9 sites to a .csv file and then open this 9 sites in 9 different tabs using URL GOTO={{COL#}} but isn't working, it only works for the 1st site.

Here is an example code:
Code: Select all
' PARAMETERS
CLEAR
WAIT SECONDS=3
FILTER TYPE=IMAGES STATUS=ON
TAB CLOSEALLOTHERS
SET !ERRORIGNORE YES

' **********************************************

' SITE #1
URL GOTO=www.hotmail.com

' SAVING URL
SET !EXTRACT {{!URLCURRENT}}
SAVEAS TYPE=EXTRACT FOLDER=C:\Documents<SP>and<SP>Settings\Administrador\Mis<SP>documentos\iMacros\Downloads\Sites FILE=sites.csv
WAIT SECONDS=3

' **********************************************

' SITE #2
URL GOTO=www.facebook.com

' SAVING URL
SET !EXTRACT {{!URLCURRENT}}
SAVEAS TYPE=EXTRACT FOLDER=C:\Documents<SP>and<SP>Settings\Administrador\Mis<SP>documentos\iMacros\Downloads\Sites FILE=sites.csv
WAIT SECONDS=3

' **********************************************

' SITE #3
URL GOTO=www.hi5.com

' SAVING URL
SET !EXTRACT {{!URLCURRENT}}
SAVEAS TYPE=EXTRACT FOLDER=C:\Documents<SP>and<SP>Settings\Administrador\Mis<SP>documentos\iMacros\Downloads\Sites FILE=sites.csv
WAIT SECONDS=3

' **********************************************

' SITE #4
URL GOTO=www.bcnpcsolutions.com

' SAVING URL
SET !EXTRACT {{!URLCURRENT}}
SAVEAS TYPE=EXTRACT FOLDER=C:\Documents<SP>and<SP>Settings\Administrador\Mis<SP>documentos\iMacros\Downloads\Sites FILE=sites.csv
WAIT SECONDS=3

' **********************************************

' SITE #5
URL GOTO=www.gmail.com

' SAVING URL
SET !EXTRACT {{!URLCURRENT}}
SAVEAS TYPE=EXTRACT FOLDER=C:\Documents<SP>and<SP>Settings\Administrador\Mis<SP>documentos\iMacros\Downloads\Sites FILE=sites.csv
WAIT SECONDS=3

' **********************************************

' SITE #6
URL GOTO=www.twitter.com

' SAVING URL
SET !EXTRACT {{!URLCURRENT}}
SAVEAS TYPE=EXTRACT FOLDER=C:\Documents<SP>and<SP>Settings\Administrador\Mis<SP>documentos\iMacros\Downloads\Sites FILE=sites.csv
WAIT SECONDS=3

' **********************************************

' SITE #7
URL GOTO=www.cnn.com

' SAVING URL
SET !EXTRACT {{!URLCURRENT}}
SAVEAS TYPE=EXTRACT FOLDER=C:\Documents<SP>and<SP>Settings\Administrador\Mis<SP>documentos\iMacros\Downloads\Sites FILE=sites.csv
WAIT SECONDS=3

' **********************************************

' SITE #8
URL GOTO=www.bing.com

' SAVING URL
SET !EXTRACT {{!URLCURRENT}}
SAVEAS TYPE=EXTRACT FOLDER=C:\Documents<SP>and<SP>Settings\Administrador\Mis<SP>documentos\iMacros\Downloads\Sites FILE=sites.csv
WAIT SECONDS=3

' **********************************************

' SITE #9
URL GOTO=www.maps.google.es

' SAVING URL
SET !EXTRACT {{!URLCURRENT}}
SAVEAS TYPE=EXTRACT FOLDER=C:\Documents<SP>and<SP>Settings\Administrador\Mis<SP>documentos\iMacros\Downloads\Sites FILE=sites.csv
WAIT SECONDS=3

FILTER TYPE=IMAGES STATUS=OFF
SET !TIMEOUT_PAGE 60

' **********************************************
' **********************************************

' PARAMETERS
SET !DATASOURCE C:\Documents<SP>and<SP>Settings\Administrador\Mis<SP>documentos\iMacros\Downloads\Sites\sites.csv
SET !DATASOURCE_COLUMNS 9
SET !LOOP 1
SET !DATASOURCE_LINE {{!LOOP}}

TAB CLOSEALLOTHERS
TAB T=1
URL GOTO={{!COL1}} ' <---- This is the only one that works

TAB OPEN
TAB T=2
URL GOTO={{!COL2}} ' <---- This doesn't works

TAB OPEN
TAB T=3
URL GOTO={{!COL3}} ' <---- This doesn't works

TAB OPEN
TAB T=4
URL GOTO={{!COL4}} ' <---- This doesn't works

TAB OPEN
TAB T=5
URL GOTO={{!COL5}} ' <---- This doesn't works

TAB OPEN
TAB T=6
URL GOTO={{!COL6}} ' <---- This doesn't works

TAB OPEN
TAB T=7
URL GOTO={{!COL7}} ' <---- This doesn't works

TAB OPEN
TAB T=8
URL GOTO={{!COL8}} ' <---- This doesn't works

TAB OPEN
TAB T=9
URL GOTO={{!COL9}} ' <---- This doesn't works


I also saw the site.csv file and this is how imacros save the URLs:
    "http://www.hotmail.com/"
    "http://www.facebook.com/"
    "http://www.hi5.com/"
    "http://www.bcnpcsolutions.com/"
    "http://www.gmail.com/"
    "http://www.twitter.com/"
    "http://www.cnn.com/"
    "http://www.bing.com/"
    "http://www.maps.google.es/"


Any ideas in how to make it work?
frankhack1
 
Posts: 75
Joined: Fri Mar 20, 2009 2:12 pm

Re: Extract URL to .csv and URL GOTO={{COL#}} isn't working

by MattBell7 on Mon Jul 25, 2011 2:27 am

you don't have 9 columns, you have 9 rows.

change this:
SET !DATASOURCE_COLUMNS 9

to:
SET !DATASOURCE_COLUMNS 1

SET !LOOP 1
SET !DATASOURCE_LINE {{!LOOP}}

to:
SET !DATASOURCE_LINE 1


TAB OPEN
TAB T=2
URL GOTO={{!COL2}}

to:
TAB OPEN
TAB T=2
SET !DATASOURCE_LINE 2
URL GOTO={{!COL1}}


seems like a crap way of doing things though, what are you trying to achieve from the script?
MattBell7
 
Posts: 628
Joined: Thu Nov 26, 2009 4:07 am
Location: United Kingdom

Re: Extract URL to .csv and URL GOTO={{COL#}} isn't working

by frankhack1 on Mon Jul 25, 2011 12:15 pm

MattBell7 wrote:you don't have 9 columns, you have 9 rows.

change this:
SET !DATASOURCE_COLUMNS 9

to:
SET !DATASOURCE_COLUMNS 1

SET !LOOP 1
SET !DATASOURCE_LINE {{!LOOP}}

to:
SET !DATASOURCE_LINE 1


TAB OPEN
TAB T=2
URL GOTO={{!COL2}}

to:
TAB OPEN
TAB T=2
SET !DATASOURCE_LINE 2
URL GOTO={{!COL1}}


seems like a crap way of doing things though, what are you trying to achieve from the script?


I'm gonna try this... I have 9 rows because Imacros create the .csv like this... how can I force Imacros to create a .csv like "http://www.hotmail.com/", "http://www.facebook.com/", "http://www.hi5.com/", "http://www.bcnpcsolutions.com/", "http://www.gmail.com/", "http://www.twitter.com/", "http://www.cnn.com/", "http://www.bing.com/", "http://www.maps.google.es/"??

The whole point for this is a macros that create ads in a advertisment site (9 advertisment to be precise), then it goes to my email where it will find the confirmation link to post the advertisment (this is done one advertisment at the time), after the first ad is post, I want to save it url as a report to my client and then go to next ad and like that till ad #9, at the end of the program I want the macros to extract the saved url and open each one of then in separate tabs to check the ads are there and not being deleted...
frankhack1
 
Posts: 75
Joined: Fri Mar 20, 2009 2:12 pm

Re: Extract URL to .csv and URL GOTO={{COL#}} isn't working

by Tom, Tech Support on Tue Jul 26, 2011 6:59 am

frankhack1 wrote:how can I force Imacros to create a .csv like "http://www.hotmail.com/", "http://www.facebook.com/", "http://www.hi5.com/", "http://www.bcnpcsolutions.com/", "http://www.gmail.com/", "http://www.twitter.com/", "http://www.cnn.com/", "http://www.bing.com/", "http://www.maps.google.es/"??
Instead using SET !EXTRACT {{!URLCURRENT}}, use ADD !EXTRACT {{!URLCURRENT}}, and don't call SAVEAS TYPE=EXTRACT after each extraction. Each time you call SAVEAS TYPE=EXTRACT, it writes a new row to the output file. If you just call it once after you are finished with all of the extractions, then each extraction is saved as a separate column.
Regards,

Tom, iMacros Support
Tom, Tech Support
 
Posts: 3297
Joined: Mon May 31, 2010 9:59 am

Re: Extract URL to .csv and URL GOTO={{COL#}} isn't working

by frankhack1 on Fri Jul 29, 2011 1:30 pm

Thanks a lot! Is working just fine now, thanks to your indications!
frankhack1
 
Posts: 75
Joined: Fri Mar 20, 2009 2:12 pm

Re: Extract URL to .csv and URL GOTO={{COL#}} isn't working

by Charliebee on Tue Dec 20, 2011 8:11 am

frankhack1 wrote:The whole point for this is a macros that create ads in a advertisment site (9 advertisment to be precise), then it goes to my email where it will find the confirmation link to post the advertisment (this is done one advertisment at the time), after the first ad is post, I want to save it url as a report to my client and then go to next ad and like that till ad #9, at the end of the program I want the macros to extract the saved url and open each one of then in separate tabs to check the ads are there and not being deleted...

This is exactly what I need to do but I can't figure out how to have imacros open the email in hotmail. In my case, I don't know what the sender or title of the email will be. Only know the domain of the sender and a portion of the title. And even if I open the email manually, I can't get imacros to click the confirmation link. I'm using imacros for ff so if this requires the scripting version, then just let me know.

Thanks
cb
Charliebee
 
Posts: 1
Joined: Tue Dec 20, 2011 7:52 am

Re: Extract URL to .csv and URL GOTO={{COL#}} isn't working

by sherluck007 on Fri May 19, 2017 3:33 am

hi sir i have same problem i want to extract URL from .csv file and when i try to start imacro its ignore link URL GOTO={{!col1}}. please someone help me i am very upset and no one ready to help me this is my code.....


var macro;
var ids=prompt("Reporting IDS File (.csv)","C:\\ids.csv" );
var amount=prompt("IDs Amount " , "e.g : 10");
var id=0;


var path=prompt("Reporting-Link's File Path (.csv)","C:\\report.csv" );

var links=prompt("Reports links " , "e.g : 10");
var l=links;

while (amount>0){
var wait=0,i=0;
macro = "CODE:";
macro +="SET !TIMEOUT_STEP 5"+ "\n";
macro +="SET !ERRORIGNORE YES" + "\n";
macro +="SET !DATASOURCE "+ids +""+ "\n";
id++;
macro +="SET !DATASOURCE_COLUMNS 2" + "\n";
var id_loop= "SET !DATASOURCE_LINE " + id ;
macro +=id_loop+ "\n";

macro += "URL GOTO=https://mbasic.facebook.com/" + "\n";
macro +="wait seconds=2" + "\n";
macro += "TAG POS=1 TYPE=INPUT:TEXT FORM=ID:login_form ATTR=NAME:email CONTENT={{!col1}}" + "\n";
macro +="wait seconds=1" + "\n";
macro += "SET !ENCRYPTION NO" + "\n";
macro += "TAG POS=1 TYPE=INPUT:PASSWORD FORM=ID:login_form ATTR=NAME:pass CONTENT={{!col2}}" + "\n";
macro +="wait seconds=2" + "\n";
macro += "TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:login_form ATTR=NAME:login" + "\n";
macro +="wait seconds=4" + "\n";

while (l>0){
if (l>70){
alert ("Links are too much and can be risky !\n Reduce links to min:50");
break;
}else if(l==0){
alert ("Invalid Links Count");
break;
}

macro +="SET !TIMEOUT_STEP 5"+ "\n";
macro +="SET !ERRORIGNORE NO" + "\n";
macro +="SET !DATASOURCE "+path ""+ "\n";
i++;
macro +="SET !DATASOURCE_COLUMNS 1" + "\n";
var loop="SET !DATASOURCE_LINE " + i ;
macro +=loop+ "\n";
macro +="URL GOTO={{!col1}}" + "\n";
macro +="wait seconds=1" + "\n";
macro +="TAG POS=1 TYPE=SPAN ATTR=TXT:Submit<SP>to<SP>Facebook<SP>for<SP>Review"+ "\n";
macro +="wait seconds=1"+ "\n";
macro +="TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:actions-form ATTR=*"+ "\n";
if (wait == 5 ){
if (links<10){
macro +="wait seconds=100" + "\n";
wait=0;
}else if (links>10 || links<=20){
if (l>0 || l<10){
macro +="wait seconds=200" + "\n";
wait=0;
}else if (l>10 || l<=20){
macro +="wait seconds=100" + "\n";
wait=0;
}

}else if (links>20 || links<=35){
if (l>0 || l<10){
macro +="wait seconds=350" + "\n";
wait=0;
}else if (l>10 || l<=20){
macro +="wait seconds=280" + "\n";
wait=0;
} else if (l>20 || l<25){
macro +="wait seconds=200" + "\n";
wait=0;
} else if (l>25 || l<=35){
macro +="wait seconds=100" + "\n";
wait=0;
}
}
else {
if (l>0 || l<5){
macro +="wait seconds=250" + "\n";
wait=0;
}else if (l>5 || l<=15){
macro +="wait seconds=380" + "\n";
wait=0;
} else if (l>15 || l<20){
macro +="wait seconds=350" + "\n";
wait=0;
} else if (l>20 || l<=35){
macro +="wait seconds=300" + "\n";
wait=0;
} else if (l>35 || l<40){
macro +="wait seconds=280" + "\n";
wait=0;
} else if (l>40 || l<50){
macro +="wait seconds=200" + "\n";
wait=0;
} else {
macro +="wait seconds=90" + "\n";
wait=0;
}
}
}else {
macro +="wait seconds=3" + "\n";
}
wait++;
l--;

}
l=links;
wait=0;
macro += "URL GOTO=https://facebook.com/" + "\n";
macro += "wait seconds=2" + "\n";
macro += "TAG POS=1 TYPE=DIV ATTR=ID:userNavigationLabel" + "\n";
macro += "wait seconds=3" + "\n";
macro += "TAG POS=2 TYPE=SPAN ATTR=TXT:Log<SP>out" + "\n";
ret=iimPlay(macro);

if (ret==-101){
break;
}

amount--;
}
sherluck007
 
Posts: 2
Joined: Fri May 19, 2017 3:13 am

Re: Extract URL to .csv and URL GOTO={{COL#}} isn't working

by chivracq on Fri May 19, 2017 4:58 am

sherluck007 wrote:hi sir i have same problem i want to extract URL from .csv file and when i try to start imacro its ignore link URL GOTO={{!col1}}. please someone help me i am very upset and no one ready to help me this is my code.....


Code: Select all
var macro;
var ids=prompt("Reporting IDS File (.csv)","C:\\ids.csv" );
var amount=prompt("IDs Amount " , "e.g : 10");
var id=0;


var path=prompt("Reporting-Link's File Path (.csv)","C:\\report.csv" );

var links=prompt("Reports links " , "e.g : 10");
var l=links;

while (amount>0){
var wait=0,i=0;
macro =  "CODE:";
macro +="SET !TIMEOUT_STEP 5"+ "\n";
macro +="SET !ERRORIGNORE YES" + "\n";
macro +="SET !DATASOURCE "+ids +""+ "\n";
id++;
macro +="SET !DATASOURCE_COLUMNS 2" + "\n";
var id_loop= "SET !DATASOURCE_LINE " + id ;
macro +=id_loop+ "\n";

macro +=  "URL GOTO=https://mbasic.facebook.com/" + "\n";
macro +="wait seconds=2" + "\n";
macro +=  "TAG POS=1 TYPE=INPUT:TEXT FORM=ID:login_form ATTR=NAME:email CONTENT={{!col1}}" + "\n";
macro +="wait seconds=1" + "\n";
macro +=  "SET !ENCRYPTION NO" + "\n";
macro +=  "TAG POS=1 TYPE=INPUT:PASSWORD FORM=ID:login_form ATTR=NAME:pass CONTENT={{!col2}}" + "\n";
macro +="wait seconds=2" + "\n";
macro +=  "TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:login_form ATTR=NAME:login" + "\n";
macro +="wait seconds=4" + "\n";

while (l>0){
if (l>70){
   alert ("Links are too much and can be risky !\n Reduce links to min:50");
   break;
}else if(l==0){
   alert ("Invalid Links Count");
   break;
}

macro +="SET !TIMEOUT_STEP 5"+ "\n";
macro +="SET !ERRORIGNORE NO" + "\n";
macro +="SET !DATASOURCE "+path ""+ "\n";
i++;
macro +="SET !DATASOURCE_COLUMNS 1" + "\n";
var loop="SET !DATASOURCE_LINE " + i ;
macro +=loop+ "\n";
macro +="URL GOTO={{!col1}}" + "\n";
macro +="wait seconds=1" + "\n";
macro +="TAG POS=1 TYPE=SPAN ATTR=TXT:Submit<SP>to<SP>Facebook<SP>for<SP>Review"+ "\n";
macro +="wait seconds=1"+ "\n";
macro +="TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:actions-form ATTR=*"+ "\n";
if (wait == 5 ){
   if (links<10){
   macro +="wait seconds=100" + "\n";
   wait=0;
   }else if (links>10 || links<=20){
      if (l>0 || l<10){
      macro +="wait seconds=200" + "\n";
      wait=0;
      }else if (l>10 || l<=20){
      macro +="wait seconds=100" + "\n";
      wait=0;
      }
   
   }else if (links>20 || links<=35){
      if (l>0 || l<10){
      macro +="wait seconds=350" + "\n";
      wait=0;
      }else if (l>10 || l<=20){
      macro +="wait seconds=280" + "\n";
      wait=0;
      } else if (l>20 || l<25){
      macro +="wait seconds=200" + "\n";
      wait=0;
      } else if (l>25 || l<=35){
      macro +="wait seconds=100" + "\n";
      wait=0;
      }
   }
   else {
      if (l>0 || l<5){
      macro +="wait seconds=250" + "\n";
      wait=0;
      }else if (l>5 || l<=15){
      macro +="wait seconds=380" + "\n";
      wait=0;
      } else if (l>15 || l<20){
      macro +="wait seconds=350" + "\n";
      wait=0;
      } else if (l>20 || l<=35){
      macro +="wait seconds=300" + "\n";
      wait=0;
      } else if (l>35 || l<40){
      macro +="wait seconds=280" + "\n";
      wait=0;
      } else if (l>40 || l<50){
      macro +="wait seconds=200" + "\n";
      wait=0;
      } else {
      macro +="wait seconds=90" + "\n";
      wait=0;
      }
   }
}else {
macro +="wait seconds=3" + "\n";
}
wait++;
l--;

}
l=links;
wait=0;
macro +=  "URL GOTO=https://facebook.com/" + "\n";
macro +=  "wait seconds=2" + "\n";
macro +=  "TAG POS=1 TYPE=DIV ATTR=ID:userNavigationLabel" + "\n";
macro +=  "wait seconds=3" + "\n";
macro +=  "TAG POS=2 TYPE=SPAN ATTR=TXT:Log<SP>out" + "\n";
ret=iimPlay(macro);

if (ret==-101){
   break;
}

amount--;
}

"i am very upset and no one ready to help me"
=> Oh yeah, ah-ah...! LOL...!! :roll:
Your Post just got approved, nobody had the time to have a look at it, you don't need to "act" such "melodramatically", ah-ah!! :shock:

(F)CIM...! :mrgreen:
Start by mentioning your FCI, read my Sig..., for me to have a look... :idea:
But your Script looks very long and pretty complex, you should be able to debug it if you were able to write such a long and complex Script, I would think... :?

And try using the Forum ]CODE[ Tags to make your Post a bit easier to read as well... :idea:
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 5715
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: Extract URL to .csv and URL GOTO={{COL#}} isn't working

by chivracq on Fri May 19, 2017 2:38 pm

And...? @sherluck007, you were crying for Help that other Users couldn't react quick enough, but 8h later you still haven't checked the Forum...! :roll:
Oh, yep you have, after my Reply..., ah-ah...! But OK, no Reply (and no Improvement to your OP), I'm a bit out for the WE...
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 5715
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: Extract URL to .csv and URL GOTO={{COL#}} isn't working

by sherluck007 on Mon May 22, 2017 3:51 am

oooopsss...my bad luck ..okay guyzz thank you very much my problem solve thats why i active after along time
sherluck007
 
Posts: 2
Joined: Fri May 19, 2017 3:13 am

Re: Extract URL to .csv and URL GOTO={{COL#}} isn't working

by chivracq on Mon May 22, 2017 4:05 am

sherluck007 wrote:oooopsss...my bad luck ..okay guyzz thank you very much my problem solve thats why i active after along time

Ah OK, good to hear...! :D

But you should still mention your FCI like I asked you, and when you manage to solve your Pb by yourself (or from some other Forum), you are expected to give an Explanation and to share your Solution/Script to make the Thread useful for other Users or I won't try to help you next time you open a Thread... :idea:

Hum, and I asked you as well to use the ]CODE[ Meta-Tags to improve the Readability of your Post and the whole Thread as your Script is very long...
(You can still edit your previous Post...)
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 5715
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)


Return to iMacros for Firefox

Who is online

Users browsing this forum: Bing [Bot] and 7 guests

Website Monitoring