[quote="Hannes, iOpus"]The following batch file reads an input file line by line and uses the file's data in an imacros command line invocation
[code]
@echo off
for /f %%A in (input.txt) DO (
imacros.exe -macro "#Current" -loop %%A
)[/code][/quote]
So when it reads the line of data, what var is it passed to? How would you use the data in imacros? Specifically, I want to read a file that is a list of URLs and then I want to pass that to URL GOTO=!VAR1 or whatever I need to do. Also, would I run that batch file itself or would imacros run that piece of code? I'm still learning. Thanks for your help.
Batch file: read data from input file
Forum rules
iMacros EOL - Attention!
The renewal maintenance has officially ended for Progress iMacros effective November 20, 2023 and all versions of iMacros are now considered EOL (End-of-Life). The iMacros products will no longer be supported by Progress (aside from customer license issues), and these forums will also no longer be moderated from the Progress side.
Thank you again for your business and support.
Sincerely,
The Progress Team
iMacros EOL - Attention!
The renewal maintenance has officially ended for Progress iMacros effective November 20, 2023 and all versions of iMacros are now considered EOL (End-of-Life). The iMacros products will no longer be supported by Progress (aside from customer license issues), and these forums will also no longer be moderated from the Progress side.
Thank you again for your business and support.
Sincerely,
The Progress Team
Re: Batch file: read data from input file
We do not recommend performing the loop on the command line. For complex loops, use the Scripting Interface . For simple ones, i.e. repeating the full macro several times, use the "Play (loop)" button.rbantau wrote: So when it reads the line of data, what var is it passed to? How would you use the data in imacros? Specifically, I want to read a file that is a list of URLs and then I want to pass that to URL GOTO=!VAR1 or whatever I need to do. Also, would I run that batch file itself or would imacros run that piece of code?
For entering data from a CSV file, use the DATASOURCE commands, cf. CSV input