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


Click here to return to the 'Create a keyboard shortcut for the maximize button' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Create a keyboard shortcut for the maximize button
Authored by: SimonDorfman.com on Jan 03, '06 09:10:21AM
Thanks for your help on this Daniel. I tried testing my script on more applications and I realized it doesn't work with Photoshop. I was trying to alter your script so it would get the name of the front window. I thought that might fix it and make it work with all applications. But I'm having some trouble. Here's what I got:

tell application "System Events"
	set frontApp to first application process whose frontmost is true
end tell

tell application (name of frontApp)
	set frontWindow to name of front window
	set zoomed of frontWindow to not (zoomed of frontWindow)
end tell
but it's not working. I don't really understand the set zoomed of window 1 to not (zoomed of window 1) line, but I was thinking maybe saving frontWindow as string or alias, but those didn't work either. Any ideas? Do you think I'm on the right track?

[ Reply to This | # ]
Create a keyboard shortcut for the maximize button
Authored by: jacobolus on Jan 06, '06 03:28:08AM
not (zoomed of window 1)
will return the opposite of (zoomed of window 1), so daniel's code just toggles the zoom

[ Reply to This | # ]