Re: Dock position and size
Re: Dock position and size
- Subject: Re: Dock position and size
- From: Luther Fuller <email@hidden>
- Date: Fri, 12 Jan 2007 07:38:56 -0600
On Jan 12, 2007, at 6:45 AM, KOENIG Yvan wrote:
I ran it under 10.4.8 and got this report:
tell current application
do shell script "defaults read com.apple.dock orientation"
"2007-01-12 10:42:38.293 defaults[514]
The domain/default pair of (com.apple.dock, orientation) does not
exist"
If you change the orientation of the Dock from the default, there
WILL exist an 'orientation' key in the com.apple.dock.plist
preference file. It will have a value of 'left', 'middle' or 'right'.
You can create this key by reading, modifying, then writing the
contents of the preference file.
I have a script that restores my preferred orientation, size and
anchor for the Dock. These preferred values are written to the record
newRecord = {|orientation|:orien, pinning:pin, tilesize:iconSize}
then ...
set prefsFile to (path to preferences from user domain) as text
bundle identifier of (info for (path to application "Dock"))
tell application "Finder" to set prefsFile to (prefsFile & the
result & ".plist") as alias
tell application "System Events"
set dockPath to (POSIX path of prefsFile)
value of property list file dockPath -- read
set dockRec to newRecord & the result -- modify
set (value of property list file dockPath) to dockRec -- write
end tell
tell application "Dock" to quit
(The order of concatenation must be as shown in the modify line.)
_______________________________________________
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/mailman//archives/applescript-users
This email sent to email@hidden