How to edit .bat file to keep IE window open

October 12, 2010 at 23:35:55
Specs: Windows XP
I have a .bat file that has this in it..

@Echo Off
setLocal EnableDelayedExpansion

set /p X=how many times do you want to run the script
set /a N+=1
if !N! gtr !X! goto :eof

Set _Path=C:\Documents and Settings\All Users\Documents\iMacros\datasources
PushD %_Path%
For /F "Tokens=1 Delims=" %%a In ('Dir /A-D /B ablogins.csv') Do (
Echo %%a
For /F "Usebackq Tokens=1 skip=1 Delims=" %%I In ("%%a") Do >>"%temp%\%%a" Echo.%%I
Move /Y "%temp%\%%a" .\
"C:\Documents and Settings\owner\Desktop\POST IMACROS\"

imacros.exe -macro "C:\Documents and Settings\All Users\Documents\iMacros\Macros\#ABLoginImacros.iim" [/B]
imacros.exe -macro "C:\Documents and Settings\All Users\Documents\iMacros\Macros\#ABImacros.iim" -loop 25 [/B]
imacros.exe -macro "C:\Documents and Settings\All Users\Documents\iMacros\Macros\#ABClearImacros.iim"

goto :loop

When it gets to the imacros lines it will open a imacros window and run that script then close it and open a new window to run the next one. What I need is to run all three imacros in the same window without closing. The reason is one I'm running if it closes the window and opens a new one the sessison expires and does not keep me logged in.

See More: How to edit .bat file to keep IE window open

Report •

October 13, 2010 at 08:18:39
please post this question in the programing forums


Report •

October 13, 2010 at 13:41:24
This is an issue with the imacros program, not the batch file. Check with their website to see if they have a forum or a help section. Someone there should be able to help you. You could also try emailing them.

EDIT: My bad, misread your question. Is this a website?

Can I put a question here?

Report •

October 13, 2010 at 13:52:08
Yes, what I have the batch file do is open imacros and go to a website. When Imacros is done running the macros it shuts down the browser window and then moves to the next line in the batch file and opens a new window. I would like to have the batch file keep the browser window open to run all three macros, one after the next in the same window.

Report •

Related Solutions

October 13, 2010 at 16:32:30
What if you just open a random tab in the browser, which will allow it to stay open and possibly not log you out.

Again, though, this is an issue with imacros, check with them.

Can I put a question here?

Report •

Ask Question