loop reading csv till the end of file

Support for iMacros. The iMacros software is the unique solution for automating every activity inside a web browser, for data extraction and web testing.
Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information: CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
senor pengwin
Posts: 40
Joined: Thu Aug 17, 2017 10:33 pm

Re: loop reading csv till the end of file

Post by senor pengwin » Fri May 22, 2020 4:09 pm

chivracq wrote:
Fri May 22, 2020 2:46 pm
The Syntax for 'iimSet()' is incorrect I think..., => the "()" are missing... :idea:

I'm actually "nearly surprised" you don't get some Compiler/Parser Error... :o
It looks like the functions for VBS is a little different than VBA.

https://wiki.imacros.net/VBS_looping


lukasz wrote:
Fri May 22, 2020 2:10 pm

Code: Select all

		Dim counter
		counter = 1

		Do Until (counter > FileLines)
			iim1.iimSet "counter", counter
			iret = iim1.iimPlayCode(magicloop)
			counter = counter + 1
		Loop

Please help me

It looks like you took some of this code from the documentation on the iMacros Wiki, but you kind of edited it a little different. Have you tried mimicking the code in the documentation using the Do While statement instead of Do Until? While it seems it should still work the do until is more of an infinite thing, the while is better for setting conditions. Not sure if this will solve but might want to try. Kind of hard to tell exactly what's happening without testing and debugging and seeing what the files actually look like, how many lines are in the file you are testing? Try debugging, maybe get a pop up message with what the actual value of "FileLines" is before running the iMacro and getting an error.

Code: Select all

Dim counter
counter = 1 

Do While Not (iret < 0)
   iim1.iimSet "counter", counter
   iret = iim1.iimPlayCode(macro)
   msgbox (iim1.iimGetExtract())
   counter = counter + 3
   If (iret < 0) Then
	'end of list reached -> next page
	iret = iim1.iimPlayCode("TAG POS=1 TYPE=A ATTR=TXT:Next")
	counter = 1
   End If
Loop
You could try:

Code: Select all

Do While Not (counter > FileLines)
chivracq
Posts: 9374
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: loop reading csv till the end of file

Post by chivracq » Fri May 22, 2020 5:38 pm

senor pengwin wrote:
Fri May 22, 2020 4:09 pm
chivracq wrote:
Fri May 22, 2020 2:46 pm
The Syntax for 'iimSet()' is incorrect I think..., => the "()" are missing... :idea:

I'm actually "nearly surprised" you don't get some Compiler/Parser Error... :o
It looks like the functions for VBS is a little different than VBA.

https://wiki.imacros.net/VBS_looping

Ah hum, re-hum-hum..., looks like you're right, ah-ah...! :o (More direct Link...)

Hum, OK, "strange", this could be mentioned/documented in the Wiki for the 'iimSet()' Command, as I had checked that Wiki Page of course before posting my Reply, where some '.VBS' Code Sample there does have the 2 "()"... :?

And I've never seen anybody using 'iimSet()' on the Forum with '.vbs' Scripts without Parentheses... But OK, I'm not very "literate" with '.vbs' and we don't often get Threads about '.vbs' Scripts on the Forum as this (usually) requires the 'Scripting Edition' and those Users usually have Direct Access to @TechSup and those Cases never reach the Forum...

>>>

Then OK, the Syntax "Mistake" looked so "obvious" to me that I didn't think any further..., and hum, I didn't "really" want to help for this Thread anymore, as I made a Sugg 2 or 3 times but @OP never reacted to it..., then I don't try to help anymore, when Users don't answer my Qt's or don't react to my Suggs... :|

But yep, I would have a closer Look at these 'FileLines' + 'counter' Vars indeed..., with a 'PROMPT' (for the 'counter' Var) in the on-the-fly Macro to make sure that 'iimSet()' Syntax without Parentheses "really" works...

And hum, maybe make sure that iMacros treats this 'FileLines' Var "really" as a Number and not as a String...! :idea:

Hum..., and + make sure that the DataSource(s) do(es)n't contain 2 Empty Lines in a row, this is a Show-Killer for '!DATASOURCE_LINE'...! :idea:
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
lukasz
Posts: 31
Joined: Fri Jan 24, 2020 10:26 am

Re: loop reading csv till the end of file

Post by lukasz » Fri May 22, 2020 5:52 pm

ok i rewrited code to use imacros example site


here is the whole vbs script you can run it

all you need to do is just edit csv path:

For Each File In .GetFolder("C:\ORDER_FILE").Files

and for now vbs will search in this folder for file that name start with "orders" i allso attached test csv file to if there are multiple fille (orders1, orders2) it will use them one by one

orders.csv can contains something like:

test1,test1
test2,test2
test3,test3
test4,test4

Code: Select all


dim macro

macro = macro & "SET !DATASOURCE {{braas}}" & vbNewLine
macro = macro & "CLEAR" & vbNewLine
macro = macro & "VERSION BUILD=12.5.503.8802" & vbNewLine
macro = macro & "TAB T=1" & vbNewLine
macro = macro & "TAB CLOSEALLOTHERS" & vbNewLine
macro = macro & "SET !TIMEOUT_STEP 180" & vbNewLine
macro = macro & "URL GOTO=http://demo.imacros.net/Automate/TestForm1" & vbNewLine



dim magicloop

magicloop = magicloop & "SET !DATASOURCE_LINE {{lines}}"& vbNewLine
magicloop = magicloop & "TAG POS=1 TYPE=INPUT:TEXT ATTR=NAME:name CONTENT={{!COL1}}" & vbNewLine
magicloop = magicloop & "TAG POS=1 TYPE=TEXTAREA ATTR=NAME:Remarks CONTENT={{!COL2}}" & vbNewLine



With CreateObject("Scripting.FileSystemObject")
    For Each File In .GetFolder("C:\ORDER_FILE").Files
        If StrComp(Left(File.Name, 6), "orders", vbTextCompare) = 0 Then
		
		
		Dim FilePath
		FilePath = File.Path

		Set fso = CreateObject("Scripting.FileSystemObject") 
		Set theFile = fso.OpenTextFile(File.Path, 8, True)  

		Dim FileLines
		FileLines = theFile.Line






		Dim iim1, iret

		'initialize iMacros instance
		set iim1= CreateObject ("imacros")
		iret = iim1.iimOpen()
		var=iim1.iimset ("braas",FilePath )
		iret = iim1.iimPlayCode(macro)

		Dim counter
		counter = 1
		


		Do While Not(counter > FileLines)
			iim1.iimSet "lines", counter
			WScript.Echo  "FilePath = " & File.Path
			WScript.Echo "FileLines = " & theFile.Line 
			WScript.Echo "counter = " & counter 
			iret = iim1.iimPlayCode(magicloop)
			counter = counter + 1
			If (counter > FileLines) Then
				'end of list reached -> next page
				iret = iim1.iimDisplay("NO MORE ROWS IN FILE")
			End If
		Loop


		iret = iim1.iimClose()

		Set Fso = Nothing
        End If
    Next
End With

lukasz
Posts: 31
Joined: Fri Jan 24, 2020 10:26 am

Re: loop reading csv till the end of file

Post by lukasz » Fri May 22, 2020 6:07 pm

chivracq wrote:
Fri May 22, 2020 5:38 pm



Ah hum, re-hum-hum..., looks like you're right, ah-ah...! :o (More direct Link...)

Hum, OK, "strange", this could be mentioned/documented in the Wiki for the 'iimSet()' Command, as I had checked that Wiki Page of course before posting my Reply, where some '.VBS' Code Sample there does have the 2 "()"... :?

And I've never seen anybody using 'iimSet()' on the Forum with '.vbs' Scripts without Parentheses... But OK, I'm not very "literate" with '.vbs' and we don't often get Threads about '.vbs' Scripts on the Forum as this (usually) requires the 'Scripting Edition' and those Users usually have Direct Access to @TechSup and those Cases never reach the Forum...

>>>

Then OK, the Syntax "Mistake" looked so "obvious" to me that I didn't think any further..., and hum, I didn't "really" want to help for this Thread anymore, as I made a Sugg 2 or 3 times but @OP never reacted to it..., then I don't try to help anymore, when Users don't answer my Qt's or don't react to my Suggs... :|

But yep, I would have a closer Look at these 'FileLines' + 'counter' Vars indeed..., with a 'PROMPT' (for the 'counter' Var) in the on-the-fly Macro to make sure that 'iimSet()' Syntax without Parentheses "really" works...

And hum, maybe make sure that iMacros treats this 'FileLines' Var "really" as a Number and not as a String...! :idea:

Hum..., and + make sure that the DataSource(s) do(es)n't contain 2 Empty Lines in a row, this is a Show-Killer for '!DATASOURCE_LINE'...! :idea:


don't get me wrong, but I tried to take your advice but I didn't find any examples of such application that I could rebuild to my needs.

I also don't like asking stupid questions :? so I stayed with vbs and imacro browser.
lukasz
Posts: 31
Joined: Fri Jan 24, 2020 10:26 am

Re: loop reading csv till the end of file

Post by lukasz » Fri May 22, 2020 6:38 pm

It looks like you took some of this code from the documentation on the iMacros Wiki, but you kind of edited it a little different. Have you tried mimicking the code in the documentation using the Do While statement instead of Do Until? While it seems it should still work the do until is more of an infinite thing, the while is better for setting conditions. Not sure if this will solve but might want to try. Kind of hard to tell exactly what's happening without testing and debugging and seeing what the files actually look like, how many lines are in the file you are testing? Try debugging, maybe get a pop up message with what the actual value of "FileLines" is before running the iMacro and getting an error.

i switched back to "do while not" and "if" but still imacros filled only at first try , and it will return error on each next loop, good sing is the loop itself works because it is executed as many times as there are lines in the file.

maybe it's really about the number being written as a string? I don't know how to check it

but I added a popup displaying the values ​​of my variables at each loop - I did it at vbs level not macro level, and they look correct you can test it, added to vbs above
chivracq
Posts: 9374
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: loop reading csv till the end of file

Post by chivracq » Fri May 22, 2020 8:55 pm

lukasz wrote:
Fri May 22, 2020 6:07 pm
don't get me wrong, but I tried to take your advice but I didn't find any examples of such application that I could rebuild to my needs.

I also don't like asking stupid questions :? so I stayed with vbs and imacro browser.

Hum, OK, I was referring to the '-playlist' CLI-Parameter I suggested several times, which looks perfectly documented to me in the Wiki, and I don't know what more Examples you need with one Parameter that expects only 2 simple Args... Not complicated to try/test, I would think... :?

I don't see what "stupid Qt's" you could ask to simply try a Sugg..., and Users using '.vbs' Scripts are "already" a bit more technical than the "average" Home Users who mostly want to "like" and "follow" on Social Media Sites... :?

And hum, just a mini-Rmk, but you've now been using the 'Trial' Version for 4 months now, while the 'Trial' is meant for 30 days... (No Comment... :oops: ) But I would think you've already had 4 times the "official" Time to "evaluate" the Software..., and if now had some iMB 'Pro' or 'Enterprise' License, you would also have Direct Access to @TechSup, where they do have '.VBS' Expertise and would be more than Happy to help you as a "Valuable Customer", ah-ah...! :wink:

>>>
lukasz wrote:
Fri May 22, 2020 6:38 pm
i switched back to "do while not" and "if" but still imacros filled only at first try , and it will return error on each next loop, good sing is the loop itself works because it is executed as many times as there are lines in the file.

maybe it's really about the number being written as a string? I don't know how to check it

but I added a popup displaying the values ​​of my variables at each loop - I did it at vbs level not macro level, and they look correct you can test it, added to vbs above

"I added a popup displaying the values ​​of my variables at each loop - I did it at vbs level not macro level, and they look correct"
=> Again...! :roll: , you need to test that at the on-the-fly Macro Level, with 'PROMPT inside the Macro... (... or using '!CLIPBOARD', or writing to some Temp 'SAVEAS' File, but 'PROMPT' is the easiest...)
'!DATASOURCE_LINE' needs your 'counter' Var...!

I'm still not "convinced" the 'iimSet()' Syntax without Brackets works..., until you've tested it... :twisted:

The Wiki Page for that "VBS Looping" Example was written for iMB/'SI' v6 or v7, I reckon, and was last updated in 2015, 5 years ago, that Page/Sample Code could be Buggy, and that Double Syntax is nowhere documented, maybe it was working in previous Versions, but if it's nowhere documented, maybe the "New" Programmer who worked on v12.6 didn't know about it either and broke it, and no Users bothered to report it as they probably fixed it in a few Minutes if they've been using iMB since v6 or v7... :|

And I'll explain how to check for Nb/String once you'll have tested that your 'counter'/'lines' Var reaches and works inside the on-the-fly Macro... :twisted:

>>>

EDIT:
Oh...!, but wait...!, I see another "fundamental" Error...!:

Code: Select all

macro = macro & "SET !DATASOURCE {{braas}}" & vbNewLine
+

Code: Select all

magicloop = magicloop & "SET !DATASOURCE_LINE {{lines}}"& vbNewLine
=> "macro" <> "magicloop", ah-ah...!

Yep, then '!DATSOURCE_LINE' has no '!DATASOURCE' specified, as all Vars get (by Design) reset between different on-the-fly Macros, and even for a same Macro between different Loops... :idea:
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
lukasz
Posts: 31
Joined: Fri Jan 24, 2020 10:26 am

Re: loop reading csv till the end of file

Post by lukasz » Fri May 22, 2020 9:47 pm

chivracq wrote:
Fri May 22, 2020 8:55 pm

>>>
lukasz wrote:
Fri May 22, 2020 6:38 pm
i switched back to "do while not" and "if" but still imacros filled only at first try , and it will return error on each next loop, good sing is the loop itself works because it is executed as many times as there are lines in the file.

maybe it's really about the number being written as a string? I don't know how to check it

but I added a popup displaying the values ​​of my variables at each loop - I did it at vbs level not macro level, and they look correct you can test it, added to vbs above

"I added a popup displaying the values ​​of my variables at each loop - I did it at vbs level not macro level, and they look correct"
=> Again...! :roll: , you need to test that at the on-the-fly Macro Level, with 'PROMPT inside the Macro... (... or using '!CLIPBOARD', or writing to some Temp 'SAVEAS' File, but 'PROMPT' is the easiest...)
'!DATASOURCE_LINE' needs your 'counter' Var...!

I'm still not "convinced" the 'iimSet()' Syntax without Brackets works..., until you've tested it... :twisted:

The Wiki Page for that "VBS Looping" Example was written for iMB/'SI' v6 or v7, I reckon, and was last updated in 2015, 5 years ago, that Page/Sample Code could be Buggy, and that Double Syntax is nowhere documented, maybe it was working in previous Versions, but if it's nowhere documented, maybe the "New" Programmer who worked on v12.6 didn't know about it either and broke it, and no Users bothered to report it as they probably fixed it in a few Minutes if they've been using iMB since v6 or v7... :|

And I'll explain how to check for Nb/String once you'll have tested that your 'counter'/'lines' Var reaches and works inside the on-the-fly Macro... :twisted:

>>>

EDIT:
Oh...!, but wait...!, I see another "fundamental" Error...!:

Code: Select all

macro = macro & "SET !DATASOURCE {{braas}}" & vbNewLine
+

Code: Select all

magicloop = magicloop & "SET !DATASOURCE_LINE {{lines}}"& vbNewLine
=> "macro" <> "magicloop", ah-ah...!

Yep, then '!DATSOURCE_LINE' has no '!DATASOURCE' specified, as all Vars get (by Design) reset between different on-the-fly Macros, and even for a same Macro between different Loops... :idea:




hmmmm interesting but you are right, this is strange because I saw that during the first loop, the values ​​from the first row were pasted. so the macro took them from somewhere ??

anyway

added

Code: Select all

magicloop = magicloop & "SET !DATASOURCE {{braas}}" & vbNewLine
and also

Code: Select all

 var=iim1.iimset ("braas",FilePath )
in my loop and it works now

PS in VBS you can use

Code: Select all

 var=iim1.iimset ("braas",FilePath )
or

Code: Select all

 iim1.iimset "braas",FilePath
but

Code: Select all

iim1.iimset ("braas",FilePath )
not working
lukasz
Posts: 31
Joined: Fri Jan 24, 2020 10:26 am

Re: loop reading csv till the end of file

Post by lukasz » Sun May 24, 2020 4:13 pm

one more thing

which version is "more correct"
Is it better to put the task in the loop or outside of it?

OUTSIDE

Code: Select all

		Do While Not(counter > FileLines)
			var=iim1.iimset ("braas",FilePath )
			var=iim1.iimSet ("lines", counter)
			iret = iim1.iimPlayCode(magicloop)
			if iret < 0 Then Set objShell = CreateObject("Wscript.Shell") : iret = iim1.iimTakeBrowserScreenshot("C:\Users\selenium\Documents\error.png", 0) : objShell.Run("powershell.exe -windowstyle hidden C:\Users\selenium\Desktop\mail.ps1") : iret = iim1.iimClose() : WScript.Quit() else
				counter = counter + 1
				If (counter > FileLines) Then exit do
		Loop

		iret = iim1.iimPlayCode(macro1)
		if iret < 0 Then Set objShell = CreateObject("Wscript.Shell") : iret = iim1.iimTakeBrowserScreenshot("C:\Users\selenium\Documents\error.png", 0) : objShell.Run("powershell.exe -windowstyle hidden C:\Users\selenium\Desktop\mail.ps1") : iret = iim1.iimClose() : WScript.Quit() else

INSIDE

Code: Select all

		Do While Not(counter > FileLines)
			var=iim1.iimset ("braas",FilePath )
			var=iim1.iimSet ("lines", counter)
			iret = iim1.iimPlayCode(magicloop)
			if iret < 0 Then Set objShell = CreateObject("Wscript.Shell") : iret = iim1.iimTakeBrowserScreenshot("C:\Users\selenium\Documents\error.png", 0) : objShell.Run("powershell.exe -windowstyle hidden C:\Users\selenium\Desktop\mail.ps1") : iret = iim1.iimClose() : WScript.Quit() else
				counter = counter + 1
				If (counter > FileLines) Then
					iret = iim1.iimPlayCode(macro1)
					if iret < 0 Then Set objShell = CreateObject("Wscript.Shell") : iret = iim1.iimTakeBrowserScreenshot("C:\Users\selenium\Documents\error.png", 0) : objShell.Run("powershell.exe -windowstyle hidden C:\Users\selenium\Desktop\mail.ps1") : iret = iim1.iimClose() : WScript.Quit() else
			end if
		Loop

Tom, Tech Support
Posts: 3601
Joined: Mon May 31, 2010 4:59 pm

Re: loop reading csv till the end of file

Post by Tom, Tech Support » Tue May 26, 2020 10:40 am

chivracq wrote:
Fri May 22, 2020 5:38 pm
senor pengwin wrote:
Fri May 22, 2020 4:09 pm
chivracq wrote:
Fri May 22, 2020 2:46 pm
The Syntax for 'iimSet()' is incorrect I think..., => the "()" are missing... :idea:

I'm actually "nearly surprised" you don't get some Compiler/Parser Error... :o
It looks like the functions for VBS is a little different than VBA.

https://wiki.imacros.net/VBS_looping

Ah hum, re-hum-hum..., looks like you're right, ah-ah...! :o (More direct Link...)

Hum, OK, "strange", this could be mentioned/documented in the Wiki for the 'iimSet()' Command, as I had checked that Wiki Page of course before posting my Reply, where some '.VBS' Code Sample there does have the 2 "()"... :?

And I've never seen anybody using 'iimSet()' on the Forum with '.vbs' Scripts without Parentheses... But OK, I'm not very "literate" with '.vbs' and we don't often get Threads about '.vbs' Scripts on the Forum as this (usually) requires the 'Scripting Edition' and those Users usually have Direct Access to @TechSup and those Cases never reach the Forum...

>>>

Then OK, the Syntax "Mistake" looked so "obvious" to me that I didn't think any further..., and hum, I didn't "really" want to help for this Thread anymore, as I made a Sugg 2 or 3 times but @OP never reacted to it..., then I don't try to help anymore, when Users don't answer my Qt's or don't react to my Suggs... :|

But yep, I would have a closer Look at these 'FileLines' + 'counter' Vars indeed..., with a 'PROMPT' (for the 'counter' Var) in the on-the-fly Macro to make sure that 'iimSet()' Syntax without Parentheses "really" works...

And hum, maybe make sure that iMacros treats this 'FileLines' Var "really" as a Number and not as a String...! :idea:

Hum..., and + make sure that the DataSource(s) do(es)n't contain 2 Empty Lines in a row, this is a Show-Killer for '!DATASOURCE_LINE'...! :idea:
The issue here with the syntax is not specific to iMacros, and that's why you won't find any mention of it in the wiki. The syntax is specifically related to how VBScript handles function/procedure calls and when it is and isn't necessary to include parentheses around the call. If you really want to know, consult a VBScript reference. :)
Regards,

Tom, iMacros Support
chivracq
Posts: 9374
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: loop reading csv till the end of file

Post by chivracq » Tue May 26, 2020 1:22 pm

Tom, Tech Support wrote:
Tue May 26, 2020 10:40 am
The issue here with the syntax is not specific to iMacros, and that's why you won't find any mention of it in the wiki. The syntax is specifically related to how VBScript handles function/procedure calls and when it is and isn't necessary to include parentheses around the call. If you really want to know, consult a VBScript reference. :)

Yeah, sure, (now) I understand..., but I "consider" that this could be mentioned (as a Note) on the Wiki-Page for 'iimSet()'... :|

In this current Thread, I "saw" a User using a specific iMacros Command with a different Syntax than the (only) one documented in the Wiki for that Command, I would never think I then need to "consult a VBScript Reference", (or the complete Documentation for any Prog Language used with iMacros as that probably also applies to other Prog Languages used with the 'SI', but the Wiki and the Documentation (for iMacros) most of the time (only) gives Examples for '.vbs' Scripts...), to find out how '.vbs' for example might handle a specific "iimXXX()" iMacros Command... :(

And still "applied" to this current Thread, I would then have spotted the "real" Mistake in this Script/Case directly (or much quicker) if that Double Syntax had been mentioned/documented in the Wiki..., that my "Point"... But OK, fair enough... :wink:

And Thanks @OP for your 3 Tests/Results... :D
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
Tom, Tech Support
Posts: 3601
Joined: Mon May 31, 2010 4:59 pm

Re: loop reading csv till the end of file

Post by Tom, Tech Support » Tue May 26, 2020 5:55 pm

chivracq wrote:
Tue May 26, 2020 1:22 pm
Tom, Tech Support wrote:
Tue May 26, 2020 10:40 am
The issue here with the syntax is not specific to iMacros, and that's why you won't find any mention of it in the wiki. The syntax is specifically related to how VBScript handles function/procedure calls and when it is and isn't necessary to include parentheses around the call. If you really want to know, consult a VBScript reference. :)

Yeah, sure, (now) I understand..., but I "consider" that this could be mentioned (as a Note) on the Wiki-Page for 'iimSet()'... :|

In this current Thread, I "saw" a User using a specific iMacros Command with a different Syntax than the (only) one documented in the Wiki for that Command, I would never think I then need to "consult a VBScript Reference", (or the complete Documentation for any Prog Language used with iMacros as that probably also applies to other Prog Languages used with the 'SI', but the Wiki and the Documentation (for iMacros) most of the time (only) gives Examples for '.vbs' Scripts...), to find out how '.vbs' for example might handle a specific "iimXXX()" iMacros Command... :(

And still "applied" to this current Thread, I would then have spotted the "real" Mistake in this Script/Case directly (or much quicker) if that Double Syntax had been mentioned/documented in the Wiki..., that my "Point"... But OK, fair enough... :wink:

And Thanks @OP for your 3 Tests/Results... :D
But if we did that, then we would have to document all such nuances for every scripting/programming language that you can use with iMacros. It's up to the person (usually a developer) using the scripting/programming language to know the proper syntax and idioms for that language. We're not going to do that for them or provide examples for every possible language.
Regards,

Tom, iMacros Support
chivracq
Posts: 9374
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: loop reading csv till the end of file

Post by chivracq » Tue May 26, 2020 6:32 pm

Tom, Tech Support wrote:
Tue May 26, 2020 5:55 pm
But if we did that, then we would have to document all such nuances for every scripting/programming language that you can use with iMacros. It's up to the person (usually a developer) using the scripting/programming language to know the proper syntax and idioms for that language. We're not going to do that for them or provide examples for every possible language.

Yeah, well, mentioning as a "Note" that some Prog Languages might (also) accept some parallel/alternative Syntax like for example [+ 1 Example for '.vbs'] would help Users "keep an open Mind", I would think..., without of course going to "the Extreme" of mentioning all Nuances for all Prog Languages, ah-ah...! :shock: , all/most Wiki Pages anyway usually only have one Example for '.vbs' already...

But OK, never mind, I was just giving my Opinion, and trying to help... :P
I'm not concerned anyway, I don't use the 'SI' with any Prog Lang, I don't even use any '.js' Scripts and prefer to do all my Scripting in pure '.iim', precisely to even avoid '.js' Scripts, ah-ah...! :oops:
The only JS I use is some very "Basic" JavaScript in 'EVAL()' for Data Manipulation (String/Number/Array), and that's good enough to find a Solution for most Threads/Scenarios on the Forum, so I'm already "Happy" like that...! :D
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
Post Reply