Batch file: read data from input file

Share your tips, tricks and favorite iMacros macros, scripts and applications for web automation in general here.
Post Reply
Hannes, Tech Support

Batch file: read data from input file

Post by Hannes, Tech Support » Thu Dec 13, 2007 11:38 am

The following batch file reads an input file line by line and uses the file's data in an imacros command line invocation

Code: Select all

@echo off
for /f %%A in (input.txt) DO (
        imacros.exe -macro "#Current" -loop %%A
)
SweetBilly
Posts: 1
Joined: Sun Oct 04, 2009 3:54 pm

Re: Batch file: read data from input file

Post by SweetBilly » Thu Oct 08, 2009 10:46 pm

could this input file contain urls, one per line?

is there a sample where it opens the url in Firefox,
clicks the mouse several times, then closes the webpage.

repeat on next url?

thanks.
Hannes, Tech Support

Re: Batch file: read data from input file

Post by Hannes, Tech Support » Fri Oct 09, 2009 8:02 am

You could indeed use the batch file for this kind of task, but it's more easy, if you run your macro in loop mode, cf. the Demo-Loop-CSV-2-Web demo macro that ships with iMacros
Post Reply