HELP to launch macro in IE from CMD-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
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the Google search box (at the top of each forum page) to see if a similar problem or question has already been addressed. This will search the entire contents of the forums as well as the iMacros Wiki.
3. We can respond much faster to your posts if you include the following information:

CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST

Answering your own posts (e.g. attempting to "bump" your topic) drops your topic from the list of unanswered threads, so it may actually receive less views.

HELP to launch macro in IE from CMD-file

by nisselars on Fri Mar 16, 2018 3:18 am

Imacro is great, but can be so frustrating:

My iim files does not work in Firefox, but they work in IE.

I would like to launch them with a cmd-file. Ive tried:

'"C:\Program Files\Internet Explorer\iexplore.exe" imacros://run/?m=[path]\[filename].iim
Result: But the macro does not open, instead IE would like to go to app store to find a program

"C:\Program Files (x86)\Ipswitch\iMacros\iMacros.Sidebar.exe" -macro [scriptname].iim
Result: IE opens with the imacrosidebar but the script does not run, and I have to start it manually. And Ive tried several ways to spell the file with or without #

- PLEASE PLEASE HELP before I go nuts !
nisselars
 
Posts: 1
Joined: Fri Mar 16, 2018 3:06 am

Re: HELP to launch macro in IE from CMD-file

by chivracq on Fri Mar 16, 2018 12:39 pm

nisselars wrote:Imacro is great, but can be so frustrating:

My iim files does not work in Firefox, but they work in IE.

I would like to launch them with a cmd-file. Ive tried:

Code: Select all
'"C:\Program Files\Internet Explorer\iexplore.exe"  imacros://run/?m=[path]\[filename].iim

Result: But the macro does not open, instead IE would like to go to app store to find a program

Code: Select all
"C:\Program Files (x86)\Ipswitch\iMacros\iMacros.Sidebar.exe" -macro [scriptname].iim

Result: IE opens with the imacrosidebar but the script does not run, and I have to start it manually. And Ive tried several ways to spell the file with or without #

- PLEASE PLEASE HELP before I go nuts !

FCIM...! :mrgreen: (Read my Sig...)
It's a Technical Forum, you need to mention your Full Config with all exact Versions..., mention as well x32/x64 as I see a "Mix" of x32/x64 in the 2 Syntaxes that you tried...

(The first Syntax you tried has an extra Single Quote at the beginning btw...)
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 7714
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: HELP to launch macro in IE from CMD-file

by GravlLift on Fri Mar 23, 2018 8:33 am

Not OP, but I'm running into this issue as well. I'm using the freeware IE for 64 bit version, tested on two different machines:

VERSION BUILD=12.0.501.6698
OPERATING SYSTEM=Windows 7 Enterprise English / Windows 10 Home English
BROWSER=IE 11.0.9600.18920 / IE 11.309.16299.0

Starting any macros, demo macros included from windows explorer or command line results in iMacros for IE opening a blank tab, then sitting there, not actually running the macro. Macro must be started manually from within the interface.
GravlLift
 
Posts: 2
Joined: Fri Mar 23, 2018 8:23 am

Re: HELP to launch macro in IE from CMD-file

by chivracq on Fri Mar 23, 2018 9:23 pm

GravlLift wrote:Not OP, but I'm running into this issue as well. I'm using the freeware IE for 64 bit version, tested on two different machines:

Code: Select all
VERSION BUILD=12.0.501.6698
OPERATING SYSTEM=Windows 7 Enterprise English / Windows 10 Home English
BROWSER=IE 11.0.9600.18920 / IE 11.309.16299.0


Starting any macros, demo macros included from windows explorer or command line results in iMacros for IE opening a blank tab, then sitting there, not actually running the macro. Macro must be started manually from within the interface.

Hum, you are all a bit "funny", ah-ah...!:
@OP posted their '.BAT' File(s) and what they tried but didn't mention their FCI (hum, and never bothered to check their Thread again after it got approved, so I guess they got it to work in the meantime but didn't bother to share the Solution, grrr...!), and you (@GravlLift) mention your FCI(s) (perfect...!) but don't mention what you really tried for Syntax...

OK, everything is x64 for you, for both your Environments...

I'm not completely sure what you mean with "from windows explorer", if you mean in Windows Explorer, double-clicking on an '.iim' File, then yep, if you've associated the '.iim' File Extension with IE at the OS/Shell Level (=> with 'iexplore.exe'), the Browser (=IE) will be able to "open" the File and display it as a '.TXT' File in a Tab. But I guess, that's not what you want...! :wink:

If you've associated the '.iim' Extension with 'iMacros.Sidebar.exe', then hum..., I'm not sure what will happen.... Hum, could work indeed, that iMacros for IE will catch the Name of the '.iim' Macro, will start IE if it was not already running, and will run the Macro in IE. Hum, maybe..., I'm not sure as I don't use IE, so I've never tried that..., it might work, but I don't think that's the "proper Way"...

What I would expect to work, is either create a Windows Shortcut on 'iMacros.Sidebar.exe' using "more or less" the 2nd Syntax from @OP for the 'Target' Field for the Shortcut. I say "more or less" because @OP posted the Syntax for x32 and you need the Equivalent for x64, pointing to the Location where your x64 'iMacros.Sidebar.exe' is...
Or you can use the same (x64) Syntax in a '.BAT' File.

That's at least the way it works on FF (that I use myself), but with the 1st Syntax @OP posted (which is for FF.). (And if you're interested, I've already posted several times the '.BAT' File(s) I use(d) myself, if you search the Forum...). And sometimes FF needs to be (force-)launched twice from the '.BAT' File (if it was not already running), so maybe, for more "Reliability", you might first need as well to start IE from your '.BAT' File prior to calling 'iMacros.Sidebar.exe' with your Macro as Argument, I don't know, I never experimented with IE and iMacros for IE... :P
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 7714
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: HELP to launch macro in IE from CMD-file

by GravlLift on Mon Mar 26, 2018 6:06 am

chivracq wrote:If you've associated the '.iim' Extension with 'iMacros.Sidebar.exe', then hum..., I'm not sure what will happen.... Hum, could work indeed, that iMacros for IE will catch the Name of the '.iim' Macro, will start IE if it was not already running, and will run the Macro in IE. Hum, maybe..., I'm not sure as I don't use IE, so I've never tried that..., it might work, but I don't think that's the "proper Way"...


My iim files have been associated with launching via iMacros.Sidebar since I installed. No changes there.

Interestingly, launching from one of these iim shortcuts or using the syntax provided by OP's second command brings up the macros sidebar with a blank IE tab, while launching the iMacros.Sidebar.exe or the command without any parameters will bring up a tab with my usual homepage. So the command argument is definitely trying to open the macro, but something is failing. Happens with any macro I try, demos included.

chivracq wrote:What I would expect to work, is either create a Windows Shortcut on 'iMacros.Sidebar.exe' using "more or less" the 2nd Syntax from @OP for the 'Target' Field for the Shortcut. I say "more or less" because @OP posted the Syntax for x32 and you need the Equivalent for x64, pointing to the Location where your x64 'iMacros.Sidebar.exe' is...
Or you can use the same (x64) Syntax in a '.BAT' File.


I don't understand what you mean by 64 vs 32 bit syntax. Presumably, the syntax is [program location] -macro [macro name], regardless of the operating system?

Are you referring to the path of OP and I's installation (Program Files (x86))? For whatever reason the install defaults to that location over the usual program files, but I assure you, the downloaded setup file is named "iMacrosFreewareSetup_12.0.501.6698_x64.exe". I don't have the 32-bit version installed.
GravlLift
 
Posts: 2
Joined: Fri Mar 23, 2018 8:23 am

Re: HELP to launch macro in IE from CMD-file

by chivracq on Mon Mar 26, 2018 9:46 am

GravlLift wrote:
chivracq wrote:If you've associated the '.iim' Extension with 'iMacros.Sidebar.exe', then hum..., I'm not sure what will happen.... Hum, could work indeed, that iMacros for IE will catch the Name of the '.iim' Macro, will start IE if it was not already running, and will run the Macro in IE. Hum, maybe..., I'm not sure as I don't use IE, so I've never tried that..., it might work, but I don't think that's the "proper Way"...

My iim files have been associated with launching via iMacros.Sidebar since I installed. No changes there.

Interestingly, launching from one of these iim shortcuts or using the syntax provided by OP's second command brings up the macros sidebar with a blank IE tab, while launching the iMacros.Sidebar.exe or the command without any parameters will bring up a tab with my usual homepage. So the command argument is definitely trying to open the macro, but something is failing. Happens with any macro I try, demos included.

Hum-hum-hum...! (That's me "thinking" loud, ah-ah...!) :)

So hum, the 'iim' File Extension gets associated with 'iMacros.Sidebar.exe' when installing the IE Add-on then... Hum OK, I would expect it to rather be associated with the iMacros Editor... Launching an '.iim' Macro from File Explorer only works when you have the Full iMB Version installed, I thought, and not with the Free Add-on...

Then again, I don't understand what you mean with "from one of these iim shortcuts". There are no '.iim' Shortcuts, '.iim' Files are "real" (Text Files) that you can open with any Text Editor, 'Notepad.exe' for example, I used myself for several years 'Notepad++.exe' as Editor, until I switched to the "Standard" iMacros Editor included with iMacros for FF from around v8.40, I think, and have since kept using it...

But if using any (Windows) Shortcut, the Shortcut needs to be pointing at the '.EXE' and not at some '.iim' File, I would think...

GravlLift wrote:
chivracq wrote:What I would expect to work, is either create a Windows Shortcut on 'iMacros.Sidebar.exe' using "more or less" the 2nd Syntax from @OP for the 'Target' Field for the Shortcut. I say "more or less" because @OP posted the Syntax for x32 and you need the Equivalent for x64, pointing to the Location where your x64 'iMacros.Sidebar.exe' is...
Or you can use the same (x64) Syntax in a '.BAT' File.

I don't understand what you mean by 64 vs 32 bit syntax. Presumably, the syntax is [program location] -macro [macro name], regardless of the operating system?

Are you referring to the path of OP and I's installation (Program Files (x86))? For whatever reason the install defaults to that location over the usual program files, but I assure you, the downloaded setup file is named "iMacrosFreewareSetup_12.0.501.6698_x64.exe". I don't have the 32-bit version installed.

Euh, yep indeed, I would expect an x64 Version/Prog to get installed in the '\Program Files\' Directory and any x32 Version to get installed in '\Program Files (x86)\', to follow a bit the "x32/x64 Convention"...! It's not very "clever" to install some x64 Version in the x32 Folder, but OK, fair enough... Maybe sbd at iOpus/Ipswitch thought, "hum x32/x64, I see "Program Files", yes I know that from Win95 and WinXP, that must be the 'x32' Directory, they (= the Microsoft Win10 Dev Team) kept the same Name for Compatibility Reasons, and hum..., strange, I don't see any "x64" Directory, only an "x86" Directory, OK 86>64>32, the "x86" is probably already the Name for the next Generation..." Well, wrong Guys, ah-ah...!

But pfff..., I don't know..., I would need to do some "Testing" myself... Pity @OP didn't bother to check/follow up on their/this Thread, I guess they probably got it to work in the end... And I guess there must be a way to get it to work, iMB v12.0 and iMacros for IE v12.0 have been released many months ago already, I guess you are not the only one to want that Functionality, so it must work or we would have gotten many-many Threads about it on the Forum otherwise...

OK, I'll see if I find the Time and Motivation to play around with that ugly IE Browser... :shock:
Hum, I see I have 2x 'iexplore.exe' on my Win10_x64 Laptop, different Sizes, one in '\Program Files\' and the other one in '\Program Files (x86)\', no "x32"\"x64" Bit Info, neither in 'Help About' in IE11 started from 'Cortana' (Win10 by Default didn't even bother to include some 'Start' Shortcut to IE, to try to force Win10 Users to switch to 'Edge', ah-ah...!, stupid Move...!), and the Version doesn't even match the Versions on the 2x '.exe', pfff..., this all looks a bit messy to me from the beginning...! :roll:
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 7714
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)


Return to Command Line and Scripting Interface

Who is online

Users browsing this forum: No registered users and 3 guests

-->