1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Any Imacros pro want to help !

Discussion in 'General Programming Chat' started by speedy5044, Jun 1, 2011.

  1. speedy5044

    speedy5044 Regular Member

    Joined:
    Jul 29, 2008
    Messages:
    456
    Likes Received:
    993
    Occupation:
    IM
    Hi
    im trying to make an imacros that can do this:
    Get data from CSV file , go to my website (lets say www.google.com) and do a search with all the keywords in the CSV file (one by one).
    So i was reading the imacros forum and i this is what come with :

    Code:
    VERSION BUILD=7210419 RECORDER=FX
    TAB T=1
    TAB CLOSEALLOTHERS  
    URL GOTO=http://www.google.com/
    CMDLINE !DATASOURCE c:/singers.csv
    'Number of columns in the CSV file. This must be accurate!
    SET !DATASOURCE_COLUMNS 1
    'Start at line 2 to skip the header in the file
    SET !LOOP 2
    'Increase the current position in the file with each loop 
    SET !DATASOURCE_LINE {{!LOOP}}
    
    TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:searchform ATTR=ID:txtSearch CONTENT={{!COL1}}
    TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:frmSearch ATTR=ID:cmdSearch
    TAG POS=1 TYPE=IMG ATTR=SRC:http://www.google.com/images/logo_small.gif
    TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:searchform ATTR=ID:txtSearch CONTENT=snoop
    TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:frmSearch ATTR=ID:cmdSearch
    TAG POS=1 TYPE=IMG ATTR=SRC:http://www.google.com/images/logo_small.gif
    But i keep getting this error:
    The files is CSV !!
     
  2. Aremys

    Aremys Regular Member

    Joined:
    Sep 13, 2008
    Messages:
    307
    Likes Received:
    72
    Change the location of singers.csv to something more accessible like the Desktop.

    C:\Users\[Username]\Desktop\singers.csv

    (Windows 7)

    Worked for me.

    EDIT:
    The error is gone, but the macro is still not working. If you want to search something in google, just use this one:

    Code:
    VERSION BUILD=7210419 RECORDER=FX
    TAB T=1
    TAB CLOSEALLOTHERS  
    CMDLINE !DATASOURCE C:\Users\[Username]\Desktop\singers.csv
    'Number of columns in the CSV file. This must be accurate!
    SET !DATASOURCE_COLUMNS 1
    'Start at line 2 to skip the header in the file
    SET !LOOP 2
    'Increase the current position in the file with each loop 
    SET !DATASOURCE_LINE {{!LOOP}}
    
    URL GOTO=http://www.google.com/search?q={{!COL1}}
    
     
    • Thanks Thanks x 1
    Last edited: Jun 1, 2011
  3. speedy5044

    speedy5044 Regular Member

    Joined:
    Jul 29, 2008
    Messages:
    456
    Likes Received:
    993
    Occupation:
    IM
    Thanks Aremys +rep added :) Its working like a charm , I appreciate your help .