use imacros code in tampermonkey

Support for iMacros. The iMacros software is the unique solution for automating every activity inside a web browser, for data extraction and web testing.
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
ratatouille
Posts: 2
Joined: Mon Feb 12, 2018 11:18 pm

use imacros code in tampermonkey

Post by ratatouille » Tue Feb 13, 2018 4:03 pm

hello it's possible to use imacros code in tampermonkey?
i tried using this:
addEventListener('load', function() {location.replace("imacros://run/?m=your-script.iim")}, false );

But doesnt work. someone can help?
User avatar
thecoder2012
Posts: 446
Joined: Sat Aug 15, 2015 5:14 pm
Location: Internet
Contact:

Re: use imacros code in tampermonkey

Post by thecoder2012 » Tue Apr 10, 2018 6:40 pm

ratatouille wrote:hello it's possible to use imacros code in tampermonkey?
Yes, it's possible. 8)
Which Browser and tampermonkey version?
Because newest Tampermonkey (v4.6.5709) was not possible with Waterfox 55. No really function with no errors.
Note: Firefox's WebExtension API is currently considered to be stable, but not complete. It still has incompatibilities and some issues. This means Tampermonkey has (besides it's own bugs ;) still some issues caused by faulty, non-existent or incompatible APIs and/or features.
Source: https://addons.mozilla.org/de/firefox/a ... permonkey/

I have used Tampermonkey 4.6.5703 and Waterfox 55.2.2
See https://addons.mozilla.org/en-US/firefo ... n-4.6.5703
ratatouille wrote:i tried using this:
addEventListener('load', function() {location.replace("imacros://run/?m=your-script.iim")}, false );
Example with google.de and alert test:

Code: Select all

// ==UserScript==
// @name         New Userscript
// @match        https://www.google.de/*
// @run-at       document-end
// @grant        none
// ==/UserScript==

alert("test");
location.replace("imacros://run/?m=your-script.iim");
I think "addEventListener('load'" is not really good or possible. See why-doesnt-document-addeventlistenerload-function-work-in-a-greasemonkey-s (same with greasemonkey)
But you can use run-at with document-end.
ratatouille wrote:But doesnt work. someone can help?
Wrong tampermonkey version?
Or I think you can use this addon redirector under https://addons.mozilla.org/en-US/firefo ... edirector/
Join 9kw.eu Captcha Service now and let your iMacros continue downloads and scripts while you sleep. - Custom iMacros? Contact me! :idea:
Post Reply