Strange behaviour of the “collapsed” property
tell application "iTunes"
number of windows --> 1
front window --> browser window id 4177 of application "iTunes"
bounds of front window --> {57, 120, 1073, 822}
collapsed of front window --> false
end tell
getProperty("iTunes")
on getProperty(theName)
tell application theName
number of windows --> 1
front window --> browser window id 4177 of application "iTunes"
bounds of front window --> {57, 120, 1073, 822}
collapsed of front window --> iTunes got an error: A descriptor type mismatch occurred.
end tell
end getProperty
When using the above scripts with the Finder (just replacing "iTunes" with "Finder"), the AppleScript error (from the second script) becomes: “Finder got an error: Can’t get |collapsed| of Finder window id 36.”
On the other hand, when using the scripts with Safari or Mail (this time replacing not only "iTunes" with "Safari" or "Mail", but also "collapsed" with "miniaturized"), no error occurs.
Does anyone know what's so special about the “collapsed” property?
15-inch MacBook Pro 2.53 GHz, Mac OS X (10.5.7), AirPort Extreme