iTunes: access crossfade time

In iTunes, the crossfade time between tracks can be set from 0 to 12 seconds. How can I access this value?

Model: G5 Dual 2.7
AppleScript: 1.10
Browser: Safari 412
Operating System: Mac OS X (10.4)

To access the value, open iTunes dictionary from the Script Editor menu. There you will see all the objects, properties, etc. I’m running iTunes 4.7, and in my dictionary there is no term for “crossfade”, which should be a property of a playlist or library. If you can’t find the term, you can’t script it.
SC

Well, that’s not exactly true. While you can’t script it directly if the application doesn’t offer support for the property in its scripting dictionary, it may be accessible through other methods. This is exactly why GUI scripting was created. Also, its possible that you could read the iTunes plist file and extract (and set) the information that way as well. I took a quick look at the plist file and it appears the values are encoded so it won’t be easy to extract the information this way but I’m sure there’s some enterprising person out there who could parse the file…

This works for me (with GUI scripting enabled on Mac OS X 10.4.1/iTunes 4.8):

tell application "iTunes" to activate
tell application "System Events"
	tell process "iTunes"
		keystroke "," using command down
		repeat while name of window 1 = "iTunes"
			delay 1
		end repeat
		keystroke "3" using command down
		set pref_window to item 1 of (get windows whose description = "dialog")
		set crossfade to (round of ((value of slider 2 of pref_window) * 12))
		keystroke "." using command down
	end tell
end tell
return crossfade

Jon