Thank you, James, the Unix commands might be just the ticket, since the scripting ideas in Kai Edwards’s article don’t seem to be working for me.
First, I tried this script from Kai Edwards’s article to toggle the dock’s minimization routine:
quit application "System Preferences"
tell application "System Events" to tell property list file ("boot backup 80:Users:jac:Library:Preferences:" & "com.apple.dock.plist")'s property list item "mineffect"
if value is "Genie" then
set value to "scale"
else
set value to "Genie"
end if
end tell
quit application "Dock"
It won’t compile. And then this script, also from Kai Edwards’s article:
tell application "System Events" to set min_effect to value of property list item "mineffect" of property list file ("boot backup 80:Users:jac:Library:Preferences:" & "com.apple.dock.plist")
Now, I don’t actually need to toggle my dock’s properties; I copied these scripts directly out of the article just to see if I could find a piece of code that worked on my machine. But neither of these has worked. An applescript error results every time from the word “property” in the phrase, “value of property list item”, and it goes no further. Furthermore, no key words “mineffect”, “Genie”, or “scale” even exist in my dock.plist file, which apparently has a structure different from the one intended to be operated on by this script.
Next, I take a different tack and change the startup disk manually using the System Preferences application. At the moment I do, the Date Modified property of files com.apple.systempreferences.plist and com.apple.recentitems.plist changes immediately to the current date and time. But when I compare two versions of the systempreferences.plist file (one in which startup disk is set for the primary partition, and one in which the startup disk is set as the secondary partition) TextWrangler says that both files are identical, as indeed they appear upon inspection to be. So what gets modified when I change the startup disk preference? If I could find that, I might be able to do something constructive.
Finally, I try GUI scripting, since I have been unable to script System Events to do it, and run the following script, also from Kai Edwards’s article, to ensure that GUI scripting is enabled:
to |enable GUI scripting|()
if (system attribute "sysv") < 4138 then display dialog "This script requires the installation of Mac OS X 10.3 or higher." buttons {"Cancel"} default button 1 with icon 2
tell application "System Events" to if not UI elements enabled then
tell me to display dialog "This script requires the built-in Graphic User Interface Scripting architecture of Mac OS X, which is currently disabled." & return & return & "Enable GUI Scripting now? (You may be asked to enter your password.)" buttons {"Cancel", "Enable"} default button 2 with icon 2
set UI elements enabled to true
if not UI elements enabled then error number -128
end if
end |enable GUI scripting|
|enable GUI scripting|()
But here again, it fails. When I run this script, the second dialog in the above script is displayed on my screen, which asks whether to “Enable GUI Scripting now?” I say Yes and click the “Enable” button, only to get an error message that says: System Events got an error: NSInternalScriptError. The only thing I haven’t tried yet is a shell script, about which I know little, so I appreciate the commands you’ve sent along in your latest post above.
James.