Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Wrapping a bookmarklet into AppleScript

edited April 2007 in FastScripts
This is not a FastScripts-specific question, but I found an interesting example of using FastScripts at ( ).

I wonder what's need to make a bookmarklet into an AppleScript.

I think I need to something like:
tell application \"Safari\"
do JavaScript \"blahblahblah\" in document 1
end tell

I just tossed a bookmarklet code minus the very first "javascript:" in blahblahblah.
I'm obviously missing something. Tried several tweaks, but didn't work.

Can you give me a little tutoral for me?


  • Hi Takaaki - I wonder if it will be instructive for you to take a look at the "Safari Next Page" script that I wrote:

    It uses a huge JavaScript in the context of the frontmost Safari window.

  • Thanks, it seems that I had a problem with URL encoding like "%20".
  • Daniel Jalkut said:
    … take a look at the "Safari Next Page" script that I wrote
    Unfortunately that script's not working with Google search pages after the recent updates and I haven't been able to figure out how to fix it. Any help is appreciated - thanks!
  • Sorry to hear it's not working so well anymore with Google. I am pretty busy right now with MarsEdit 3 related fixes, so I won't be able to give it a look very soon, but I'm adding it to my TODO list. In the mean time if anybody else figures out what needs to be done to fix it, that would be great.

    I should move all the scripts up to an open source hosting platform like bitbucket or github, at some point.

  • Thanks for the response. If only I wasn't so clueless how to debug and possibly fix this [type of] problem.

    I've been postponing updating to Snow Leopard, though MarsEdit 3 was added to my list of reasons to do it.
Sign In or Register to comment.