I googled all evening and haven’t yet found anything useful… I hope these questions will be very easy to Applescript gurus here )
Is there a way to get full height (or top left corner coordinates) of a window including its header (do not know the right term, the bar with close-minimize-maximize buttons and window title)? Seems that ‘bounds’ and ‘position’ of Window suite do not know about it.
Is there a way to enable GUI scripting via Applescript?
How can I get properties with spaces in names? For example,
tell application "Finder" to get position of Finder window "Macintosh HD"
works fine, and
tell application "Finder" to get has shadow of Finder window "Macintosh HD"
results in error, though, according to documentation, Window suite has ‘has shadow’ property.
Aren’t “magic numbers” you have used sort of dangerous? I mean, window header can have other height, depending on user settings. I think, there have to be another way, something without hardcoding.
I’d really like to know about the ‘magic numbers’ as well. Even if there’s no way for a window’s decoration panel to be something other than 22, that seems pretty sloppy, and who’s to say they won’t change it to 25 or something in OS XI?
Surely there’s a handy way to grab the title-bar size in actionscript, or at least calculate it from other sizes?