Page 1 of 1

Javascript from the imacro same as the developer console?

Posted: Sun Aug 13, 2017 11:32 am
by frenchboy
There's one thing I was wondering, when we do javascript scrolling or other, is it the same thing as typing the javascript inside the developer console?

Re: Javascript from the imacro same as the developer console

Posted: Sun Aug 13, 2017 6:46 pm
by chivracq
frenchboy wrote:There's one thing I was wondering, when we do javascript scrolling or other, is it the same thing as typing the javascript inside the developer console?
CIM...! :mrgreen: (Read my Sig..., many Commands are not implemented for all Browsers/Versions, or behave differently...)

Hum, yes and no, ah-ah...!, to answer your Qt... I would expect the Result to be the same, as they both get interpreted and run by the same JavaScript Engine of the Browser, but iMacros puts an extra Wrapper on it because of the 'URL GOTO' Command and how it is implemented in the iMacros Add-on and the Browser can put "Limitations" on Add-ons as well, like for example on iMacros for FF v9.0.3, this Syntax (URL GOTO=javascript:...) is not supported anymore...

Re: Javascript from the imacro same as the developer console

Posted: Sun Aug 13, 2017 7:54 pm
by frenchboy
chivracq wrote:
frenchboy wrote:There's one thing I was wondering, when we do javascript scrolling or other, is it the same thing as typing the javascript inside the developer console?
CIM...! :mrgreen: (Read my Sig..., many Commands are not implemented for all Browsers/Versions, or behave differently...)

Hum, yes and no, ah-ah...!, to answer your Qt... I would expect the Result to be the same, as they both get interpreted and run by the same JavaScript Engine of the Browser, but iMacros puts an extra Wrapper on it because of the 'URL GOTO' Command and how it is implemented in the iMacros Add-on and the Browser can put "Limitations" on Add-ons as well, like for example on iMacros for FF v9.0.3, this Syntax (URL GOTO=javascript:...) is not supported anymore...
interesting, is there another way to send javascript to the browser?

Re: Javascript from the imacro same as the developer console

Posted: Sun Aug 13, 2017 8:13 pm
by chivracq
frenchboy wrote:interesting, is there another way to send javascript to the browser?
Sorry but "CIM" again for me to follow up... I don't answer your Qt's anymore if you don't answer mine... :roll:
You need to use the Forum "a bit correctly" for me to want to help you... :idea:

Re: Javascript from the imacro same as the developer console

Posted: Mon Aug 14, 2017 9:27 am
by frenchboy
well my question isn't really version or OS dependent, I will change version or OS if I need to. But generally I use FF54 imacros 8.9.7 on Ubuntu 16.04.3 LTS

Re: Javascript from the imacro same as the developer console

Posted: Mon Aug 14, 2017 4:31 pm
by chivracq
frenchboy wrote:well my question isn't really version or OS dependent, I will change version or OS if I need to. But generally I use

Code: Select all

FF54 imacros 8.9.7 on Ubuntu 16.04.3 LTS
Of course it is Browser or (iMacros) Version dependent!, like I already mentioned about v9.0.3 for FF in my first Reply, and I'm not sure you can even access the Console in iMB for example as well... :roll:

And I usually simply don't read Threads and certainly don't answer when FCI is not mentioned..., or only once for first time Posters...
And I simply don't follow up either if I ask a Qt and you ignore it..., this is the "Basics" of "Communication" I would think..., it's supposed to be "bi-directional"... :idea:
frenchboy wrote:interesting, is there another way to send javascript to the browser?
Well, "another way" is a bit vague as you didn't post how you "already" use the Console in combination with iMacros, but you can have a look at the following Thread which I think is the most "Advanced" Thread on the Forum about using/misusing the Console with iMacros...:
- Re: Message without stopping macro?

Hum..., and not only "a bit vague" is how you (already or wanted to) use the Console, but for what Purpose...? If you explain a bit what you want to do, then maybe I can find some "Alternative"..., but from "vague" / generic Qt's, you can only get some generic Answers... :idea:

Re: Javascript from the imacro same as the developer console

Posted: Mon Aug 14, 2017 11:40 pm
by chivracq
Last Paragraph added to my previous Reply, as I notice you've checked the Forum in the meantime between my original Post and the later Edit...

Re: Javascript from the imacro same as the developer console

Posted: Tue Aug 15, 2017 1:32 pm
by frenchboy
chivracq wrote:Last Paragraph added to my previous Reply, as I notice you've checked the Forum in the meantime between my original Post and the later Edit...
I'm not really trying to do anything, I've just been using imacros a lot lately and was wondering how it works.

Re: Javascript from the imacro same as the developer console

Posted: Tue Aug 15, 2017 2:39 pm
by chivracq
frenchboy wrote:
chivracq wrote:Last Paragraph added to my previous Reply, as I notice you've checked the Forum in the meantime between my original Post and the later Edit...
I'm not really trying to do anything, I've just been using imacros a lot lately and was wondering how it works.
Ah OK..., well, you can always decompile the Add-on if you are curious..., it's quite interesting to have a look...! 8) :
- Re: Extend Imacros with new commands?

Re: Javascript from the imacro same as the developer console

Posted: Wed Aug 23, 2017 6:47 am
by iimfun
A small note to curious @frenchboy.

1. Open Web Console in Chrome (with iMacros already installed).
2. Paste and run the code given below.

Code: Select all

javascript:(function() {try{var e_m64 = "UFJPTVBUJTIwJTIySGVsbG8lMjAlNDBmcmVuY2hib3khJTIy", n64 = "bWFjcm8uaWlt";if(!/^(?:chrome|https?|file)/.test(location)){alert('iMacros: Open webpage to run a macro.');return;}var macro = {};macro.source = decodeURIComponent(atob(e_m64));macro.name = decodeURIComponent(atob(n64));var evt = document.createEvent("CustomEvent");evt.initCustomEvent("iMacrosRunMacro", true, true, macro);window.dispatchEvent(evt);}catch(e){alert('iMacros Bookmarklet error: '+e.toString());}}) ();
(This script doesn't work under Firefox Web Console for some reasons.)