Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Add/Remove from Dock?



On 6/27/06 5:01 AM, "email@hidden" <email@hidden> wrote:

> Take a look at ~/Library/Preferences/com.apple.Dock.plist and the use of the 
> command line tool 'defaults' (man defaults for help.)
> 
> You also need to restart the dock after you've edited the .plist:
> 
> do shell script "killall Dock"


Since this has come up...

Why does the following Applescript, if run repeatedly, keep adding
occurrences of TextEdit to my Dock? My interpretation of manual for defaults
leads me to believe that duplicate entries would not result from such a
command.

The only workaround IÕve found is to search for the entry first, then 
not add it if itÕs found. Thanks.

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>/Applications/TextEdit.app</string><key>_CFURLStringType</key><integer>0</integer></dict></dict></dict>'"

tell application "Dock" to quit


-- 
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:
http://lists.apple.com/mailman/options/applescript-users/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.