frankhack1 wrote:Hi !
I'm trying PaleMoon 24.6.2 (x86) with iMacros 8.8.2
I have the following code:
Code: Select all
var myLoop;
myLoop = "CODE:";
myLoop += "SET !DATASOURCE C:\\NumAnuncios\\Data.csv" + "\n";
myLoop += "SET !DATASOURCE_LINE 2" + "\n";
myLoop += "SET !EXTRACT {{!COL1}}" + "\n";
iimPlay(myLoop);
var loop;
loop = iimGetExtract();
This is the content of Data.csv
Code: Select all
"TITLE_01","TITLE_02","TITLE_03","TITLE_04","TITLE_05"
"10","12","10","3","10"
The alert(loop) returns 10, so this is fine.
Now I want to add +2 to the amount extracted from the Data.csv, in this example the extracted data is 10 + 2, I need to return 12, but I'm getting 102 instead.
This is how I do the calculation
Code: Select all
increment = loop + 2;
alert(increment);
What you get as a Result doesn't really surprise me to be honest...!, 'iimGetExtract()' expects a String, too bad if "10" is a Number for you!, 10+2=102...!, yep normal...!, just like "item" + "42" gives "item42"..., you need to convert the Return of 'iimGetExtrat()' to a Number if you know it will be one, or even more simple I would think is to do your "+2" still in the .iim Macro (the .iim 'ADD' Command is more tolerant than pure JavaScript...)
And mini-Remark, I don't understand why you run your pseudo-.iim Macro as an on the fly .iim. Macro created from a .js Script, instead of running it directly as a normal .iim Macro... I don't see anything in your .js Script that justifies your Approach...
And btw, you have the right Config, PM 24.x + iMacros for FF v8.8.2, don't try to update iMacros to v8.8.3+ (current is v8.8.
, it will not work...!!!
There is a PM v25 Version available which I haven't tried/tested yet with any/all iMacros Versions available...
so using PM, I would say, stick to the same Config like me, unless you know how to test and revert easily to previous Versions for PM and iMacros: =>
PM v24.6.2, iMacros for FF v8.8.2 (Win7-x64)... (This Config rocks...! (Meaning it works fine and I would say that I support it, if anything goes wrong compared to the 'standard" FF corresponding Version, FF35 at this moment, I will do my best to solve the Pb for PM..., That's my Config and the Version(s) I use..., if anything goes wrong with my Config, I will always find a Solution... (well for my Needs...!))
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...