Help with Batch File

Discussions and Tech Support related to automating the iMacros Browser or Internet Explorer from any scripting and programming language, such as VBS (WSH), VBA, VB, Perl, Delphi, C# or C++.
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

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
Post Reply
Sxcd1
Posts: 6
Joined: Mon Dec 28, 2015 2:14 am

Help with Batch File

Post by Sxcd1 » Mon Dec 28, 2015 2:24 am

I want to create a batch file that I can run from task scheduler from windows at a particular time. It will run a macro that will click on a button on the website. I created the macro which runs fine in the imacro browser but when I run this batch file it works great then the window closes. I need the web page to stay open untill manually closed.

"C:\Program Files (x86)\Ipswitch\iMacros\iMacros.exe" -macro "D:\Users\Sxcd1\Documents\iMacros\Macros\Mymacro.iim"
iMacros Version 11.0.246.4051
Chrome Version 47.0.2526.106
Firefox 43.0.3
Windows 10 Pro x 64
User avatar
Edoctoor
Posts: 34
Joined: Sun Nov 29, 2015 7:53 pm

Re: Help with Batch File

Post by Edoctoor » Mon Dec 28, 2015 6:35 am

It would be nice if you provide us with

IMacro version
Browser version
Operating System
Last edited by Edoctoor on Tue Dec 29, 2015 10:09 am, edited 1 time in total.
iMacros Version 11.0.246.4051
Browser FireFox 42.0
OS Windows 7 Home Premium - Service Pack 1

Before starting a topic please read the following; thank you!
http://forum.imacros.net/viewtopic.php?f=20&t=3331#p8799
Sxcd1
Posts: 6
Joined: Mon Dec 28, 2015 2:14 am

Re: Help with Batch File

Post by Sxcd1 » Mon Dec 28, 2015 12:37 pm

Thanks for the reply. I'm at work so I don't have the version of imacros in front of my. I'm using windows 10 pro and the bat file has only that one line of code I put in my original post.
iMacros Version 11.0.246.4051
Chrome Version 47.0.2526.106
Firefox 43.0.3
Windows 10 Pro x 64
User avatar
Edoctoor
Posts: 34
Joined: Sun Nov 29, 2015 7:53 pm

Re: Help with Batch File

Post by Edoctoor » Mon Dec 28, 2015 4:41 pm

getting closer
Last edited by Edoctoor on Tue Dec 29, 2015 10:09 am, edited 1 time in total.
iMacros Version 11.0.246.4051
Browser FireFox 42.0
OS Windows 7 Home Premium - Service Pack 1

Before starting a topic please read the following; thank you!
http://forum.imacros.net/viewtopic.php?f=20&t=3331#p8799
User avatar
Edoctoor
Posts: 34
Joined: Sun Nov 29, 2015 7:53 pm

Re: Help with Batch File

Post by Edoctoor » Mon Dec 28, 2015 4:45 pm

Please provide the required information.. so we can assist you. best regards.
Last edited by Edoctoor on Tue Dec 29, 2015 10:10 am, edited 1 time in total.
iMacros Version 11.0.246.4051
Browser FireFox 42.0
OS Windows 7 Home Premium - Service Pack 1

Before starting a topic please read the following; thank you!
http://forum.imacros.net/viewtopic.php?f=20&t=3331#p8799
Sxcd1
Posts: 6
Joined: Mon Dec 28, 2015 2:14 am

Re: Help with Batch File

Post by Sxcd1 » Tue Dec 29, 2015 3:00 am

I'm using iMacros Browser (x86) Version 11.0.246.4051, I have Chrome Version 47.0.2526.106 m, and Firefox 43.0.3. I would prefer to use Chrome or iMacros Browsers
iMacros Version 11.0.246.4051
Chrome Version 47.0.2526.106
Firefox 43.0.3
Windows 10 Pro x 64
Sxcd1
Posts: 6
Joined: Mon Dec 28, 2015 2:14 am

Re: Help with Batch File

Post by Sxcd1 » Tue Dec 29, 2015 11:00 pm

My batch file contains:
start "" /B /Max "C:\Program Files (x86)\Ipswitch\iMacros\iMacros.exe" -macro "D:\Users\Sxcd1\Documents\iMacros\Macros\WatchNow2.iim"
wait

But it still closed the imacros explorer window when complete
iMacros Version 11.0.246.4051
Chrome Version 47.0.2526.106
Firefox 43.0.3
Windows 10 Pro x 64
Tanckom
Posts: 79
Joined: Fri Jan 15, 2016 12:12 pm

Re: Help with Batch File

Post by Tanckom » Mon Jan 18, 2016 12:15 am

To run an iMacro from a batch file, this is the needed code:

Code: Select all

@echo off
start firefox imacros://run/?m=test.iim
So if you use internet Explorer, i can think it will be the same, only that you use:

Code: Select all

@echo off
start iexplorer imacros://run/?m=test.iim
FCIM
Firefox: 56.0
Os: Windows 10 x64
iMacros: 9.0.3
Sxcd1
Posts: 6
Joined: Mon Dec 28, 2015 2:14 am

Re: Help with Batch File

Post by Sxcd1 » Mon Jan 18, 2016 2:50 am

The Firefox bat file launches firefox but gives an error saying Size and DS not supported. So I guess I need to run the iMacros browser. When I run the bat file with

@echo off
start imacros imacros://run/?m=WN.iim

the iMacros browser runs but not the macro
iMacros Version 11.0.246.4051
Chrome Version 47.0.2526.106
Firefox 43.0.3
Windows 10 Pro x 64
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Help with Batch File

Post by chivracq » Mon Jan 18, 2016 5:31 am

Sxcd1 wrote:I want to create a batch file that I can run from task scheduler from windows at a particular time. It will run a macro that will click on a button on the website. I created the macro which runs fine in the imacro browser but when I run this batch file it works great then the window closes. I need the web page to stay open untill manually closed.

"C:\Program Files (x86)\Ipswitch\iMacros\iMacros.exe" -macro "D:\Users\Sxcd1\Documents\iMacros\Macros\Mymacro.iim"
Sxcd1 wrote:I'm using

Code: Select all

iMacros Browser (x86) Version 11.0.246.4051, I have Chrome Version 47.0.2526.106 m, and Firefox 43.0.3.
I would prefer to use Chrome or iMacros Browsers
Pfff, Thread a bit messy, can you add your FCI to your OP for me to have a look...? Sorry, I want to see the FCI in the OP to read the Question...

But, hum, IMB (I don't use) and iMacros for CR, too buggy, I don't use either, so I don't promise much... (But you never know, once I will have read the Qt...)
- (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...
Sxcd1
Posts: 6
Joined: Mon Dec 28, 2015 2:14 am

Re: Help with Batch File

Post by Sxcd1 » Tue Jan 19, 2016 2:16 am

Here is my simple macro. It clicks on the watch now button after calling up a website http://www.creativelive.com. This is only available on current tutorials (onair). It would be great the also make the imacro or firefox browsers full screen.

VERSION BUILD=1102464051
TAB T=1
TAB CLOSEALLOTHERS
URL GOTO=https://www.creativelive.com/courses/ip ... a-kelleher
SIZE X=1632 Y=883
WAIT SECONDS=1.156
DS CMD=CLICK X=556 Y=512 CONTENT=
WAIT SECONDS=2.062
DS CMD=CLICK X=995 Y=566 CONTENT=
WAIT SECONDS=0.000

Thanks
iMacros Version 11.0.246.4051
Chrome Version 47.0.2526.106
Firefox 43.0.3
Windows 10 Pro x 64
tan
Posts: 1
Joined: Mon Nov 20, 2017 2:52 am

Re: Help with Batch File

Post by tan » Mon Nov 20, 2017 2:54 am

please help me
New version of chrome opened imacros in a new window and this command does not run
please help me another command line can run imaccros with new version of chrome
thank you very much
destatez
Posts: 9
Joined: Wed May 28, 2014 5:19 pm

Re: Help with Batch File

Post by destatez » Mon Nov 19, 2018 4:38 pm

There is a post above that has "To run an iMacro from a batch file, this is the needed code:" The 2 examples provided were for IE & Firefox. How do I start Chrome to run an iim file?
Post Reply