|
|
#11 |
|
Moderator
Join Date: Jan 2002
Location: Singapore
Posts: 4,237
|
57- AppleScript to launch Apple's X11 and The Gimp
(Thanks to Martin Costabel and Marcelo Camperi)
Write a script in AppleScript Editor that looks like this: Code:
tell application "X11" activate end tell do shell script "export DISPLAY=:0 && source /sw/bin/init.sh && gimp" Works the same way for any program that uses Apple's X11, was installed by fink, and can be started from the command line. You can also write a regular shell script to start an application, and then use "DropScript" to generate an application that will run the shell script. The way to activate Apple's X11 by these means is to use the line: osascript -e 'tell application "X11" to activate' at the start of your shell script. About DropScript: "DropScript is an application for Mac OS X which lets you create new applications from any BSD program which takes files as command line arguments. Typically, these are scripts written in sh, perl, or other scripting languages". (freeware - OSX downloads): http://www.apple.com/downloads/macos...ropscript.html |
|
|
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|