> 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 changed to minimize. (1 = maximize, 3 = close.)

Doesn't rely on GUI scripting:

    tell app (path to frontmost application as text)
    	try
    		set zoomed of window 1 to not (zoomed of window 1)
    	end try
    end tell
    

Windows-style:

    tell app "Finder" to set dtb to bounds of window of desktop
    tell app (path to frontmost application as text)
    	try
    		set bounds of window 1 to dtb
    	end try
    end tell