Make .JS only run the .iim files with correct value in CSV?

Support for iMacros. The iMacros software is the unique solution for automating every activity inside a web browser, for data extraction and web testing.

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.

Make .JS only run the .iim files with correct value in CSV?

by LiuKang on Fri Jul 12, 2013 2:10 am

I have a .iim-file for each website and a Javescript file that execute each file.

Very basic, looks like this.

Code: Select all
iimPlay("GoogleMacro.iim");
iimPlay("IBMMacro.iim");
iimPlay("IMDBMacro.iim");
iimPlay("AltavistaMacro.iim");
iimPlay("GametrailersMacro.iim");
iimPlay("MortalCombatMacro.iim");
iimPlay("WikipediaMacro.iim");


This works really good!

The .iim-files, each have a unique !SETLOOP, gather imput data from the same external .csv file.

It looks like this:

Code: Select all
URLINFO,URLINFO2,DATA1,DATA2
"http://google.com","GOOGLE","hello","thank you for searching"
"http://ibm.com","IBM","null","null"
"http://imdb.com","IMDB","null","null"
"http://altavista.com","ALTAVISTA","rip","rest in peace, my friend",
"http://gametrailers.com","GAMETRAILERS","null","null"
"http://mortalkombat.wikia.com","MORTALCOMBAT","null","null"
"http://wikipedia.org","WIKIPEDIA","null","null"


COL1 and COL2 is only information for me, the .iim-files do not use these values.

I want to make the .JS-file only run if COL3 has a value else than null.

The logic:

Code: Select all
#Import urldata.csv

Loop whole CSV {
ROW2, If COL3 = null --> go to ROW3
else iimPlay("GoogleMacro.iim");
ROW3, If COL3 = null --> go to ROW4
else iimPlay("IBMMacro.iim");
Etc..
}


But don't know Javacript, and importing/reading a .csv-file without jQuery (since it's not allowed?) seems hard.

How do I do this the best?

Best regards,

Liu Kang
LiuKang
 
Posts: 2
Joined: Mon Jul 08, 2013 12:42 am

Return to General Support & Discussions

Who is online

Users browsing this forum: No registered users and 8 guests

-->