Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Create identical tiled windows in most apps via AppleScript' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Create identical tiled windows in most apps via AppleScript
Authored by: kanenas on Apr 20, '08 11:13:24AM
A "try" block can catch the lack of an "orientation" property. Something like:
tell application "System Events"
	set dockProps to property list file "~/Library/Preferences/com.apple.dock.plist"
	try
		set dockSide to the value of the property list item "orientation" of dockProps
	on error
		set dockSide to "bottom" -- this is the default orientation, right?
	end try
	set dockTileSize to the value of the property list item "tilesize" of dockProps
end tell
if dockSide is "bottom" then
	set availScreenHeight to availScreenHeight - (dockTileSize + 10)
else if dockSide is in {"left", "right"} then
	set availScreenWidth to availScreenWidth - (dockTileSize + 10)
end if


[ Reply to This | # ]