Re: Script to add alias to dock
Re: Script to add alias to dock
- Subject: Re: Script to add alias to dock
- From: Laine Lee <email@hidden>
- Date: Fri, 25 Apr 2008 12:38:52 -0500
- Thread-topic: Script to add alias to dock
Title: Re: Script to add alias to dock
On 4/23/08 11:41 AM, "email@hidden" <email@hidden> wrote:
Hello all:
I am new to the world of Apple and I have developed a script ot mount my network smb shares, but I would like to add an alias (for the created mounts) to the dock - can anyone point me in the right direction? (Google has not been kind using various and assorted terms)
set hojo to choose folder with prompt "Please choose a volume to add to the dock..." default location (((path to startup disk as Unicode text) & "Volumes") as alias)
--set trolokite to (characters 1 thru -2 of (POSIX path of hojo)) as Unicode text
set trolokite to (POSIX path of hojo) as Unicode text
--display dialog trolokite
do shell script "defaults write com.apple.dock persistent-apps -array-add '<dict><key>tile-data</key><dict><key>file-data</key><dict><key>_CFURLString</key><string>" & trolokite & "</string><key>_CFURLStringType</key><integer>0</integer></dict></dict></dict>'"
do shell script "sh -c \"killall Dock\""
--
Laine Lee
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden