Here is a method that will create an icon in the Dock for the passed application bundle:
` ---------------------------------------------------
` Project method: AddToDock
` Example: AddToDock("myApp";"/Applications/myApp.app")
` ---------------------------------------------------
` Programmer: Jeremy Sullivan
` Created: Mon, Mar 13, 2006 8:00 AM
` ---------------------------------------------------
` Description: Adds an application to the Dock on Mac OS X
` ---------------------------------------------------
` Parameters
` Passed:
` $1 TEXT - Application name as it should appear in the Dock
` $2 TEXT - Posix path to the application bundle (don't forget the .app)
` Returned:
` ---------------------------------------------------
` Calls:
` Called By:
` ---------------------------------------------------
C_TEXT($1;$2;$applicationName_t;$applicationPath_t)
C_TEXT($command_t;$inputStream_t;$outputStream_t;$errorStream_t)
$applicationName_t:=$1 ` myApp
$applicationPath_t:=$2 ` must be a posix path (/Applications/myApp.app)
$command_t:="defaults write com.apple.dock persistent-apps -array-add "
$command_t:=$command_t+"'
$command_t:=$command_t+"
$command_t:=$command_t+"
$command_t:=$command_t+"
$command_t:=$command_t+"
$command_t:=$command_t+"
$command_t:=$command_t+"
$command_t:=$command_t+"
LAUNCH EXTERNAL
PROCESS($command_t;$inputStream_t;$outputStream_t;$errorStream_t)
LAUNCH EXTERNAL PROCESS("killall -HUP Dock";$inputStream_t;$outputStream_t;$errorStream_t) ` relaunch the Dock