Hi,
suddenly I decided that I want a keyboard shortcut for zooming windows. You can use xGestures to assign zoom window to a mouse gesture, however I am a keyboard person so after hours scouring the web on applescript stuff I finally did it ! In case anyone who wants to do the same here is how I did it, utilizing Quicksilver's triggers function.
1) Open script editor and paste the below inside an empty window
tell application "System Events"
set theApp to get name of first process whose frontmost is true
end tell
tell application theApp
set zoomed of front window to true
end tell
2) Save it, I used zoomWindow.scpt
3) Go to preferences -> triggers of quicksilver
(fire up command for quicksilver then press apple - , for the preferences pane)
4) Create a new trigger (click on the '+' sign)
5) Type in the name of your saved script (you may want to press apple - r when you fire up quicksilver to ask it to rescan your directories so that your new file can be found). The default action is to run as applescript which is correct. Press enter when done.
6) Double click on the trigger column and enter whatever you like to use as a keyboard shortcut.
And test it out on any window. It should zoom the front most window. You can alter it to set the bounds to the size of your monitor so that it will always take up all the space like the maximise function on windows.
This is where I finally managed to scavange something that worked for me. I just altered the code abit.
Link to code that I altered
suddenly I decided that I want a keyboard shortcut for zooming windows. You can use xGestures to assign zoom window to a mouse gesture, however I am a keyboard person so after hours scouring the web on applescript stuff I finally did it ! In case anyone who wants to do the same here is how I did it, utilizing Quicksilver's triggers function.
1) Open script editor and paste the below inside an empty window
tell application "System Events"
set theApp to get name of first process whose frontmost is true
end tell
tell application theApp
set zoomed of front window to true
end tell
2) Save it, I used zoomWindow.scpt
3) Go to preferences -> triggers of quicksilver
(fire up command for quicksilver then press apple - , for the preferences pane)
4) Create a new trigger (click on the '+' sign)
5) Type in the name of your saved script (you may want to press apple - r when you fire up quicksilver to ask it to rescan your directories so that your new file can be found). The default action is to run as applescript which is correct. Press enter when done.
6) Double click on the trigger column and enter whatever you like to use as a keyboard shortcut.
And test it out on any window. It should zoom the front most window. You can alter it to set the bounds to the size of your monitor so that it will always take up all the space like the maximise function on windows.
This is where I finally managed to scavange something that worked for me. I just altered the code abit.
Link to code that I altered