Call Saved Macro Based on Value in CSV

Discussions and Tech Support related to automating the iMacros Browser or Internet Explorer from any scripting and programming language, such as VBS (WSH), VBA, VB, Perl, Delphi, C# or C++.
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
Post Reply
old_cadger
Posts: 1
Joined: Thu Apr 30, 2015 4:26 pm

Call Saved Macro Based on Value in CSV

Post by old_cadger » Thu Apr 30, 2015 4:43 pm

Hi Guys.

I am fairly new to imacros and am new to the forum.

I have a number of form filling macros I run individually from individual csv files.

I am looking to consolidate the csv files into 1 csv file, and write a script that will call the individual macros based on the value contained within a column.

Lets say I have a csv file with the following information:

Form,F_Name,L_Name,Age
Webform_1,John,Jingle,21
Webform_1,Bob,Builder,93
Webform_2,Alice,Appleseed,53
Webform_1,Kyle,Keebler,36
Webform_3,Henry,Handyman,65

I would like to use the form column to call the form filling macro (Webform_1.iim, Webform_2.iim or Webform_3.iim)

It would also be nice to pull the number of rows in the csv file to feed the number of times to repeat macro.

Has anyone done this or something similar? Any pointers or samples would be greatly appreciated.

-Old_Cadger
chivracq
Posts: 8201
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Call Saved Macro Based on Value in CSV

Post by chivracq » Sat May 02, 2015 3:06 pm

old_cadger wrote:Hi Guys.

I am fairly new to imacros and am new to the forum.

I have a number of form filling macros I run individually from individual csv files.

I am looking to consolidate the csv files into 1 csv file, and write a script that will call the individual macros based on the value contained within a column.

Lets say I have a csv file with the following information:

Form,F_Name,L_Name,Age
Webform_1,John,Jingle,21
Webform_1,Bob,Builder,93
Webform_2,Alice,Appleseed,53
Webform_1,Kyle,Keebler,36
Webform_3,Henry,Handyman,65

I would like to use the form column to call the form filling macro (Webform_1.iim, Webform_2.iim or Webform_3.iim)

It would also be nice to pull the number of rows in the csv file to feed the number of times to repeat macro.

Has anyone done this or something similar? Any pointers or samples would be greatly appreciated.

-Old_Cadger
CIM...! :mrgreen: (For me to read the Question... :idea: )
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 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...
Post Reply