Fill Multi line

Discussions and Tech Support specific to the iMacros Firefox add-on.
Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information: CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
chivracq
Posts: 9369
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Fill Multi line

Post by chivracq » Thu Apr 07, 2016 10:07 am

Tamilselvan wrote:The following code fill 2nd row only.

Code: Select all

TAG POS={{!LOOP}} TYPE=INPUT:TEXT FORM=ID:clusters_entry ATTR=ID:min_wage_rate* CONTENT={{!col1}}
TAG POS={{!LOOP}} TYPE=INPUT:TEXT FORM=ID:clusters_entry ATTR=ID:max_wage_rate* CONTENT={{!col2}}
TAG POS={{!LOOP}} TYPE=INPUT:TEXT FORM=ID:clusters_entry ATTR=ID:total_wages* CONTENT={{!col3}}
Fill 2nd Row.jpg
I want to fill 61 rows and fetch from CSV file. Please do the needful. The following is source code .

Code: Select all

ERSION BUILD=8961227 RECORDER=FX
TAB T=1

SET !DATASOURCE "C:\\Users\\OFFICE\\Documents\\iMacros\\Datasources\\Book1.csv"
'URL GOTO=http://tnrd.gov.in/project/mgnrega_forms/mgnregs_max_min_wage_rate.php
SET !LOOP 2
SET !DATASOURCE_LINE {{!LOOP}}

TAG POS={{!LOOP}} TYPE=INPUT:TEXT FORM=ID:clusters_entry ATTR=ID:min_wage_rate* CONTENT={{!col1}}
TAG POS={{!LOOP}} TYPE=INPUT:TEXT FORM=ID:clusters_entry ATTR=ID:max_wage_rate* CONTENT={{!col2}}
TAG POS={{!LOOP}} TYPE=INPUT:TEXT FORM=ID:clusters_entry ATTR=ID:total_wages* CONTENT={{!col3}}
Yeah but, it's fairly simple from now, you should be able to solve it by yourself...

The 'SET !LOOP 2' is perfect, to avoid the Header in your '.CSV', but that means that the 1st Row in your Sheet is filled with the 2nd Row in your DataSource, then either you remove the Header in your 'CSV' and you can use the "raw" '!LOOP' starting at 1 and you specify "61" in the 'Max' Field for 'Play (Loop)', or you need to adapt the Raw '!LOOP' (= to subtract 1) for the Rows to match between DataSource and Web-Page. (And you'll need to specify "62" in the 'Max' Field because your '.CSV' contains 62 Rows, Header included, otherwise the Macro will stop just before the last Row...)

It's very simple, there is no Difficulty..., but OK, your Script then becomes:

Code: Select all

VERSION BUILD=8961227 RECORDER=FX
TAB T=1
'URL GOTO=http://tnrd.gov.in/project/mgnrega_forms/mgnregs_max_min_wage_rate.php

SET !DATASOURCE "C:\\Users\\OFFICE\\Documents\\iMacros\\Datasources\\Book1.csv"
SET !LOOP 2
SET !DATASOURCE_LINE {{!LOOP}}
SET My_LOOP {{!LOOP}}
ADD My_LOOP -1

TAG POS={{My_LOOP}} TYPE=INPUT:TEXT FORM=ID:clusters_entry ATTR=ID:min_wage_rate* CONTENT={{!col1}}
TAG POS={{My_LOOP}} TYPE=INPUT:TEXT FORM=ID:clusters_entry ATTR=ID:max_wage_rate* CONTENT={{!col2}}
TAG POS={{My_LOOP}} TYPE=INPUT:TEXT FORM=ID:clusters_entry ATTR=ID:total_wages* CONTENT={{!col3}}
And you loop this Script 62 times which will become 61 times because of the Header...

And I've corrected the missing 'V' in "VERSION" from your Script... Well, enjoy, this should be working like you want I expect now... 8)
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
Tamilselvan
Posts: 90
Joined: Mon Mar 07, 2016 10:49 am

Re: Fill Multi line

Post by Tamilselvan » Thu Apr 07, 2016 10:46 am

Thank you very much. Its working.

You are great !!!

Thanks a lot !!!!

I feel very happy.

Thank you !!!
chivracq
Posts: 9369
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Fill Multi line

Post by chivracq » Thu Apr 07, 2016 11:01 am

Tamilselvan wrote:Thank you very much. Its working.

You are great !!!

Thanks a lot !!!!

I feel very happy.

Thank you !!!
Yep, good to hear and glad I could help :D , but I hope you go reading a bit of Documentation and a few Pages of Threads on the Forum and experiment a bit yourself with iMacros to understand a bit more how iMacros works (and what you can do with it...) as I won't be helping you (provided you use the Forum in a correct way...) in such detailed Steps next time as in this Thread... :idea:
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
Tamilselvan
Posts: 90
Joined: Mon Mar 07, 2016 10:49 am

Re: Fill Multi line

Post by Tamilselvan » Thu Apr 07, 2016 12:01 pm

I am just learning Imacros from last few days.

I will do. Thank you .
Post Reply