7

The only workaround I am aware of is using applescript in Spark/FastScripts with

do shell script "python script.py"
user479534
  • 4,931

5 Answers5

4

In 10.6 Snow Leopard it's quite easy to add any command to the Services menu of each application (or specific applications), and then assign a keyboard shortcut.

Here on Super User, see Fast User Switching/Apple Menu? for an example that invokes some shell script.

Arjan
  • 31,511
1

You can use Keyboard Maestro to launch an application or script from the keyboard. There is also IronAHK (AutoHotkey rewrite) which works under Mono, example:

^n::Run, /path/to/script.py

although make sure the script has sufficient execute permissions and a shebang line.

1

You can also use automator to make a contextual menu invoked script.

Fred
  • 136
0

Personally I don't see anything wrong with your workaround. It seems like a perfect solution, so much so that when I found this question in a Google search, that's the one I used. Thanks! :-)

Sparkette
  • 724
0

Other applications that launch AppleScripts like FastScripts (lite) include Quicksilver, Butler, and ControllerMate.

I believe Quicksilver may allow for the execution of Shell scripts directly from within the application, but I dislike Quicksilver on the point that it seems to flake out more often than Butler does.

dotHTM
  • 1,519