Jump to content

AutoItmonkey


psylem
 Share

Recommended Posts

For all the Greasemonkey fans out there who also love AutoIt, I hacked this together, not sure if it's actually useful, but have a play and see what you think...

http://potato.codefreaks.com.au/AutoItmonkey.xpi

It's a branch of the latest release of Greasemonkey (Ver 0.8.20080609.0) with some added API functions:

  • GM_clearCookies(domain): removes all cookies including session cookies for a given host
  • GM_openFile(filePath): opens any file using the default opener for that file type
  • GM_runAU3(au3Path): this is the neat one, it executes an AutoIt script
Firstly, uninstall Greasemonkey (you wont loose your existing userscripts). Then install the version linked above.

Beware: You have no reason to trust me, I posted this in the Developer Chat section because I figured people here would be able to confirm that there was nothing malicious going on here. If you can't do so then just don't run it. Or run it in a virtual machine, with a super paranoid firewall. I don't want to encourage unsafe practices, but I also want to share this little gem with some folks here who might appreciate it. FYI the only code I've changed is in greasemonkey.js and utils.js if you want to do a diff against the official release. Also, you need to decide for your self if you really want your userscripts to have all the power of AutoIt and make up your mind about the security implications involved in allowing this. Personally, I think it rocks.

I forgot to mention, the first time you try to run an AU3 script it will prompt you for the location of the AutoIt executable (C:\Program Files\AutoIt3\AutoIt3.exe by default). Locate the file on your file system and it will remember from then on.

Edited by psylem
Link to comment
Share on other sites

  • 6 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...