Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

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.

share|improve this question
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
add comment

2 Answers

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.

share|improve this answer
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.