How to call iMacros .js script from command line?

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
Lightja
Posts: 20
Joined: Tue Aug 30, 2016 3:40 am

How to call iMacros .js script from command line?

Post by Lightja » Mon Sep 05, 2016 2:38 am

This should be straightforward and easy to find, but alas I've had no luck.

I just want to be able to start a .js file containing iMacros code from a command line so that I can start it using a batch file so that I can automate it. Everything I've found on the subject talks about using firefox, but I want to use the basic scripting interface that comes with standard/enterprise version and works with all browsers, and NOT the version that ONLY works with firefox.

this example in the wiki shows an example of the code, but since it uses an html window with a hyperlink to start it, that's not exactly command line friendly. One other person asked a similar question here but it was never answered.

System information

iMacros 11.1
Windows 10
Latest Firefox/Chrome/IE browsers
Last edited by Lightja on Mon Sep 05, 2016 5:29 am, edited 1 time in total.
Latest System Information:
iMacros 11.1
Windows 10 Enterprise
Firefox v48.0.2 - iMacros for Firefox v8.9.7
Chrome v53.0.2785.89 - iMacros for Chrome v8.4.4
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: How to call iMacros .js script from command line?

Post by chivracq » Mon Sep 05, 2016 3:45 am

Lightja wrote:This should be straightforward and easy to find, but alas I've had no luck.

I just want to be able to start a .js file containing iMacros code from a command line so that I can start it using a batch file so that I can automate it. Everything I've found on the subject talks about using firefox, but I want to use the basic scripting interface that comes with standard/enterprise version and works with all browsers, and NOT the version that ONLY works with firefox.

this example in the wiki shows an example of the code, but since it uses an html window with a hyperlink to start it, that's not exactly command line friendly. One other person asked a similar question here but it was never answered.
CIM...! :mrgreen:
=> Always mention your FCI when you open a Thread or I won't respond to any one...
(And your previous Thread is waiting for some Follow-up from your Side I think...)

=> CIM => Sorry, didn't read the Content of the Thread, and/or I only answer once for first time Posters, not your case anymore... :roll:
- (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...
Lightja
Posts: 20
Joined: Tue Aug 30, 2016 3:40 am

Re: How to call iMacros .js script from command line?

Post by Lightja » Mon Sep 05, 2016 5:14 am

Sorry, just to be clear:

System Information:
iMacros 11.1
Windows 10
Latest Firefox/Chrome/IE browsers

Also added it to my signature because why not.
Latest System Information:
iMacros 11.1
Windows 10 Enterprise
Firefox v48.0.2 - iMacros for Firefox v8.9.7
Chrome v53.0.2785.89 - iMacros for Chrome v8.4.4
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: How to call iMacros .js script from command line?

Post by chivracq » Mon Sep 05, 2016 6:20 am

Lightja wrote:Sorry, just to be clear:

System Information:
iMacros 11.1
Windows 10
Latest Firefox/Chrome/IE browsers

Also added it to my signature because why not.
OK, I'll read your OP "tomorrow" after some Sleep, but from the Thread Title, you'll find many Examples on the Forum I would think... :idea:
- (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...
Lightja
Posts: 20
Joined: Tue Aug 30, 2016 3:40 am

Re: How to call iMacros .js script from command line?

Post by Lightja » Tue Sep 06, 2016 12:51 am

You'd think so, but everything I've found is referring to starting just the firefox scripting interface, not the imacros one.
Latest System Information:
iMacros 11.1
Windows 10 Enterprise
Firefox v48.0.2 - iMacros for Firefox v8.9.7
Chrome v53.0.2785.89 - iMacros for Chrome v8.4.4
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: How to call iMacros .js script from command line?

Post by chivracq » Tue Sep 06, 2016 2:17 am

Lightja wrote:You'd think so, but everything I've found is referring to starting just the firefox scripting interface, not the imacros one.
Hum, OK, I think I understand what you want, but hum, I've never used the iMB nor the Scripting Interface so I don't have any Experience with that but from what I understand from the JavaScript Example from the Wiki you referred to is that you must/can(?) imbed your JavaScript Macro in an HTML Page that you must/can start from a BAT File to open it using IE, seems to be the Obligation because of the ActiveX Object.

And otherwise, if you want to run a '.js' Script (containing your ("main") Macro), you can launch it from a BAT File with FF and its built-in JavaScript Engine. And this Approach sounds more simple than the first one, I would think..., maintaining your Macros embedded in some HTML Pages won't be very easy, editing those HTML Pages will be a bit of a hassle, for editing and debugging, without the Help of the iMacros-Editor.

But I am a bit guessing like you, TechSup would need to jump into the Thread... If you are using IM10/11, I guess you have some Support License with allows you to open some Ticket with TechSupport and you should get some Answer more easily (and quicker) than from the Forum... (and post their Answer here of course, that could always help other Users...).
- (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...
Lightja
Posts: 20
Joined: Tue Aug 30, 2016 3:40 am

Re: How to call iMacros .js script from command line?

Post by Lightja » Tue Sep 06, 2016 7:33 am

Not sure if they do support for trial versions, but it's looking more like I might end up just doing most things in firefox anyways so I might end up just going that route and letting the trial run out.
Latest System Information:
iMacros 11.1
Windows 10 Enterprise
Firefox v48.0.2 - iMacros for Firefox v8.9.7
Chrome v53.0.2785.89 - iMacros for Chrome v8.4.4
Rooney10057
Posts: 2
Joined: Fri May 05, 2017 8:13 pm

Re: How to call iMacros .js script from command line?

Post by Rooney10057 » Fri May 05, 2017 10:18 pm

The same feeling and question i have!!!
First of All "I love imacros, really :D" (but some limitations irritates...)

Operating System windows 8
My Browser, my macro version, doesn't matter as i am ready to install ANY browser version, ANY macro version, Provided i can accomplish my below listed task:

---1) I need to run javascript
---2) I need to upload files (multiple files)


(Above points needs to be done on a Single browser as they uses a single dynamic page created on clicking a button)
"And it's better if i can see the js instructions running on sidebar for debugging."


I need Javascript for nested loops with using the variables (total 2 variables). 1st variable will be used to identify macro name (total 30 macros) and second Variable will be used for to determine the no of times it (that specific macro) should iterate.

---Limitations: Only Firefox run .js macro directly BUT it can't Upload files (i.e passed 1st point, failed in second one)
---Limitations: Chrome fails in boths
---Limitations: Internet explorer (AND imacros Browser itself) can upload files but don't directly execute js files (passed in 2nd, failed in 1st)

THANKS!
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: How to call iMacros .js script from command line?

Post by chivracq » Sat May 06, 2017 9:05 pm

Rooney10057 wrote:The same feeling and question i have!!!
First of All "I love imacros, really :D" (but some limitations irritates...)

Code: Select all

Operating System windows 8
My Browser, my macro version, doesn't matter as i am ready to install ANY browser version, ANY macro version, Provided i can accomplish my below listed task:

---1) I need to run javascript
---2) I need to upload files (multiple files)


(Above points needs to be done on a Single browser as they uses a single dynamic page created on clicking a button)
"And it's better if i can see the js instructions running on sidebar for debugging."

I need Javascript for nested loops with using the variables (total 2 variables). 1st variable will be used to identify macro name (total 30 macros) and second Variable will be used for to determine the no of times it (that specific macro) should iterate.

---Limitations: Only Firefox run .js macro directly BUT it can't Upload files (i.e passed 1st point, failed in second one)
---Limitations: Chrome fails in boths
---Limitations: Internet explorer (AND imacros Browser itself) can upload files but don't directly execute js files (passed in 2nd, failed in 1st)

THANKS!
Okay...!, if you want to use JavaScript, you'll need indeed iMacros for FF.
But v9.0.3 for FF doesn't support the File Upload Functionality anymore indeed, so you simply need to make sure to use v8.9.7 (which still works on FF53 which is the current FF Version) that you can (re)install from the iMacros for FF Version History Page or from the Mozilla Add-ons Archive.
And you'll need to make sure to disable Automatic Updates for iMacros in your FF Add-ons Manager, otherwise it will want to update itself to v9.0.3...
- (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...
Rooney10057
Posts: 2
Joined: Fri May 05, 2017 8:13 pm

Re: How to call iMacros .js script from command line?

Post by Rooney10057 » Sun May 07, 2017 12:41 pm

chivracq wrote: Okay...!, if you want to use JavaScript, you'll need indeed iMacros for FF.
But v9.0.3 for FF doesn't support the File Upload Functionality anymore indeed, so you simply need to make sure to use v8.9.7 (which still works on FF53 which is the current FF Version) that you can (re)install from the iMacros for FF Version History Page or from the Mozilla Add-ons Archive.
And you'll need to make sure to disable Automatic Updates for iMacros in your FF Add-ons Manager, otherwise it will want to update itself to v9.0.3...

THANKS A LOT!!!
Its Working!!!
Mission accomplished :D
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: How to call iMacros .js script from command line?

Post by chivracq » Sun May 07, 2017 1:21 pm

Rooney10057 wrote:THANKS A LOT!!!
Its Working!!!
Mission accomplished :D
Ah-ah...! Good...!! :D
- (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...
Post Reply