2

I'm trying to make a HTML page that I can save as a bookmark in Safari or Google Chrome that runs an Automator workflow, action or application, or possibly an Applescript.

It's only for my personal computer and I want to use the simplest possible approach to accomplishing this.

  • 2
    I don't think that this would get past the secure sandboxes of either browser. Why not just a link on the desktop or dock? What does the workflow do? Is it talking to the current open page in the browser? Maybe a Javascript bookmarklet is a possibility? – Thilo Feb 19 '12 at 9:18
1

A file:// link (with the path to your desired program) can point to a workflow, application, or AppleScript on your local drive. Clicking the link will not run the application (this lack of functionality is generally considered to be a desirable security feature), but it will open a Finder window and select the file in question, so pressing O or will run the desired program.

0

Here is an idea with a local apache server.

  1. Install Apache on your machine.
  2. Locate Apache access.log
  3. Watch the changes on this file with this command, and look after a specific string in the log: here, I am watching the access to my Drupal web application

Type this command in a terminal

$ tail -f access_log | awk '/drupal/ {system("/Applications/capture.app/Contents/MacOS/Application\\\ Stub");}' 

Capture.app is an automator application. It can be anything you want, for example:

$ system("say Drupal");  # speech synthesis
$ system("open -R /");   # opens the Finder

This is not a clean solution, it processes all the log when it starts, and it's attached to a terminal. Apache has mechanisms to do this with hooks.

You don't even have to have something at the URL. The only important part is the request in acces_log.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .