penfold1992 wrote:The result of removing those quotes is the following:
"output1,output2,output3,output4, "
The issue with this output is that a csv file would read this as one entry with the value "output1,output2,output3,output4, " rather than 4 entries.
Hum, yeah-yeah, I understand the "Issue" with the Output as one String between Double Quotes...
But, hum..., then instead of building your final Extract for the SAVEAS from the .js Script, I would try to build it from your 'macro' .iim Script..., by passing it back and forth from the .js Script to the .iim Script where the new Extract would be added to the existing '!EXTRACT' that would already contain all the Extracts that you've already collected from the previous Runs...
But before trying that, you can first test if one Run of the .iim Macro with at least 2 Extracts in it, passed to the .js Script which then saves them in the final SAVEAS .iim Script returns the Results that you expect...
Hum, and for the Semi-Colon as a Delimiter instead of the Colon, you can use '!DATASOURCE_DELIMITER', but then you need to build the Final Extract from .iim anyway...
penfold1992 wrote:additionally, is there a way to count the number of entries within a csv file? This would enable me to set a loop correctly leaving off the additional ", " at the end of the string
Pfff, not really, or not straight forward, at least that I know of... There is an Enhancement Request
here to add Support for Nested Variables in .iim Scripts for '!COLn', but we've been crying and shouting and begging for a long time already, but it's not been implemented (yet...!?) by Development... Grrrrr...!!!
Add your Voice in the Thread, I would say...
What you could do is, if you know that your Max-Nb of Columns is 20 for example, have an .iim Macro (try to) retrieve the Values of {{!COL1}} ... {{!COL20}} and do your own Counting in your .js Script on the Array returned in '!EXTRACT'... A bit cumbersome but that should work...
EDIT: But, hum, I forgot, but in the Post just after the Post I referred you to in the Thread where there is the Enhancement Request for Nested Variables, there is a Workaround by 'Skippyto' in JavaScript that you can pretty well reuse/adapt in/to your case...
- (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...