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++.

Moderators: Community Moderators, iMacros Moderators

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.

How to call iMacros .js script from command line?

by Lightja on Sun Sep 04, 2016 7:38 pm

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 Sun Sep 04, 2016 10:29 pm, 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
Lightja
 
Posts: 20
Joined: Mon Aug 29, 2016 8:40 pm

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

by chivracq on Sun Sep 04, 2016 8:45 pm

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)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: 5959
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

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

by Lightja on Sun Sep 04, 2016 10:14 pm

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
Lightja
 
Posts: 20
Joined: Mon Aug 29, 2016 8:40 pm

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

by chivracq on Sun Sep 04, 2016 11:20 pm

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)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: 5959
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

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

by Lightja on Mon Sep 05, 2016 5:51 pm

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
Lightja
 
Posts: 20
Joined: Mon Aug 29, 2016 8:40 pm

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

by chivracq on Mon Sep 05, 2016 7:17 pm

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)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: 5959
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

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

by Lightja on Tue Sep 06, 2016 12: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
Lightja
 
Posts: 20
Joined: Mon Aug 29, 2016 8:40 pm

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

by Rooney10057 on Fri May 05, 2017 3: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!
Rooney10057
 
Posts: 2
Joined: Fri May 05, 2017 1:13 pm

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

by chivracq on Sat May 06, 2017 2: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)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: 5959
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

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

by Rooney10057 on Sun May 07, 2017 5:41 am

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
Rooney10057
 
Posts: 2
Joined: Fri May 05, 2017 1:13 pm

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

by chivracq on Sun May 07, 2017 6:21 am

Rooney10057 wrote:THANKS A LOT!!!
Its Working!!!
Mission accomplished :D

Ah-ah...! Good...!! :D
- (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: 5959
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)


Return to Scripting and Command Line Interface

Who is online

Users browsing this forum: No registered users and 1 guest

-->