Can I run a macro from a server with a link?

Discussions and Tech Support specific to the iMacros Firefox add-on.
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
kjemmo
Posts: 6
Joined: Fri Nov 25, 2011 1:15 pm

Can I run a macro from a server with a link?

Post by kjemmo » Wed Jul 31, 2013 4:45 pm

Hi.

I would like to provide some links that run a macro.

I know that I can do links to local files like this:

Code: Select all

href="imacros://run/?m=my-macro.iim"
But can I somehow link to a file on a remote server?

If I try this it wont work ( say that the macro can't be found)

Code: Select all

href="imacros://run/?http://domain.com/macros/my-macro.com.iim"
If this is not an option for the free Firefox version, is it then possible with any of the other versions?

Thanks for helping
User avatar
garyst1981
Posts: 125
Joined: Tue Jan 15, 2013 1:01 am
Location: Philadelphia, PA
Contact:

Re: Can I run a macro from a server with a link?

Post by garyst1981 » Wed Jul 31, 2013 10:15 pm

maybe Alertfox?
www.gustavorivera.com.mx
kjemmo
Posts: 6
Joined: Fri Nov 25, 2011 1:15 pm

Re: Can I run a macro from a server with a link?

Post by kjemmo » Wed Jul 31, 2013 10:43 pm

OK I was able to make it work... Sort of:

I Made this very simple macro for testing:

Code: Select all

PROMPT Works
When I click "Share Macro" from the Edit menu there is an option to share a link on websites. The link look like this:

Code: Select all

javascript:(function() {try{var e_m64 = "UFJPTVBUJTIwV29ya3M=", n64 = "cHJvbXB0LmlpbQ==";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());}}) ();
And if I wrap that in an anchor tag like this (use single quotes!):

Code: Select all

<a href='javascript:(function() {try{var e_m64 = "UFJPTVBUJTIwV29ya3M=", n64 = "cHJvbXB0LmlpbQ==";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());}}) ();'>My test link</a>
I can make the link work at my site.

I could not get any of the url shorteners to work. Do they work?

I also wonder if the macro is encrypted in someway?
User avatar
garyst1981
Posts: 125
Joined: Tue Jan 15, 2013 1:01 am
Location: Philadelphia, PA
Contact:

Re: Can I run a macro from a server with a link?

Post by garyst1981 » Wed Jul 31, 2013 11:38 pm

So for what you use something like that? to make a shared macro? why don't just pass the code of the macro?
www.gustavorivera.com.mx
Tom, Tech Support
Posts: 3834
Joined: Mon May 31, 2010 4:59 pm

Re: Can I run a macro from a server with a link?

Post by Tom, Tech Support » Thu Aug 01, 2013 11:39 am

kjemmo wrote:I also wonder if the macro is encrypted in someway?
The macro code is encoded (not encrypted). Notice that in the example you posted, you don't actually see the macro code "PROMPT Works".
Regards,

Tom, iMacros Support
Post Reply