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++.

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.

Call Saved Macro Based on Value in CSV

by old_cadger on Thu Apr 30, 2015 9:43 am

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
old_cadger
 
Posts: 1
Joined: Thu Apr 30, 2015 9:26 am

Re: Call Saved Macro Based on Value in CSV

by chivracq on Sat May 02, 2015 8:06 am

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...
chivracq
 
Posts: 6474
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)


Return to Scripting and Command Line Interface

Who is online

Users browsing this forum: Bing [Bot] and 1 guest

-->