|03-14-2003, 03:23 AM||#11|
Join Date: Jan 2002
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:
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.
"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):
|Display Modes||Rate This Thread|