it clashes with other commands in some applications, for example this one I'm using right now, Firefox.
Firefox doesn't support System Preferences ▸ KBS at all...
@Asmus
the zoom button (that´s button 2)
In at least iTunes 10 button 2 has changedI have assigned this script to minimize. (1 = maximize, 3 = close.)
Doesn't rely on GUI scripting⌘M with FastScripts:
try
tell appapplication "Finder" to bounds of window of desktop
tell application (path to frontmost application as text)
try
set zoomedbounds of window 1 to notresult
(zoomed of window 1)end tell
on error
end try
end tell
Windows-style:
tell app "Finder" to set dtb to boundstell ofapplication window"System ofEvents" desktop
tellto apptell (pathprocess to1 frontmostwhere applicationit asis textfrontmost)
try
setclick bounds(button 1 of window 1 towhere dtbsubrole is "AXZoomButton")
end tell
end try
end telltry
It doesn't work if you have multiple displays though.
Applications that support maximizing windows to fill the screen: