UIV as iMacros alternative: Compare Variable With Csv In Loop (Need Help To Convert Macro From Imacros to Kantu)


I create a macro for Imacros in javascript that comprare my current ip saved in a variable with all ip saved in csv, if the ip address is present in csv the macro close the browser (or execute another code example pause), if the ip address is NOT present in csv the macro load a site. I use kantu as imacros alternatives.

This imacro alternative works with a cicle of 100 times and comprare ip current with every line of csv.

Can help me to convert this iMacros script for Kantu ?

I create this script in javascript for imacros but i need to convert for Kantu but for me it’s difficult, Kantu support If, else and more functions.

This is the imacros code to convert in Kantu

// Var
var jsNewLine = “\n”
var Loops = 100
var IpCurrent =

// Loop
for (i = 1; i < Loops; i ++ )


// Macro Code
code = “”;
code += “CODE:” + jsNewLine
code += “SET !ERRORIGNORE YES” + jsNewLine
code += “SET !LOADCHECK YES” + jsNewLine
code += “SET !REPLAYSPEED FAST” + jsNewLine
code += “SET !POINTER YES” + jsNewLine
code += “SET !TIMEOUT 30” + jsNewLine
code += “SET !TIMEOUT_TAG 0” + jsNewLine
code += “SET !EXTRACT_TEST_POPUP NO” + jsNewLine

code += “SET !DATASOURCE C:\ip_addresses.csv” + jsNewLine
code += “SET !DATASOURCE_COLUMNS 1” + jsNewLine
code += "SET !DATASOURCE_LINE " + i + jsNewLine

code += “ADD !EXTRACT {{!COL1}}” + jsNewLine


// Save Ip Used In Variable (from csv)
IpUsed = iimGetLastExtract(1);

// Compare Ip Current With Ip Used (Csv)

if (IpCurrent == IpUsed)


// Close Browser If IpCurrent = IpUsed
iimPlayCode (“PAUSE”)



// After Comprare IpCurrent with 100 lines of csv if IpCurrent is not present in csv load a site
iimPlayCode (“URL GOTO=ht*ps://www.google.com”)

Thanks for help

See csv Read