Resize windows to specific size using Automator or Applescript?

Joined
Oct 19, 2011
Messages
86
Reaction score
0
Points
6
Your Mac's Specs
21.5" 2.7GHz Quad-Core Intel Core i5 with 12GB RAM and 2TB HDD, 32 GB iPad 2, 32 GB iPhone 4
Ok, so I made the switch from the magic mouse (which I loved) to the trackpad (which I REALLY love). BetterTouchTool has made the trackpad unbelievably, amazingly useful. One thing though that I can't get right is the "return window to original size" function.

Basically, I have a 3 finger swipe up to maximize the window and 3 fingers down is supposed to bring it back to the original size. Problem is I switch through windows a lot so I think once you leave that page it forgets the original size.

To make a long story short, is there a way to set Automator or Applescript to resize windows to a specific size? I could replace the 3 finger swipe with the applescript and I'd be golden. I'm looking to do this universally, if possible....but otherwise the main programs I need it for are safari, finder and iTunes.
 
OP
DaGrandMastah
Joined
Oct 19, 2011
Messages
86
Reaction score
0
Points
6
Your Mac's Specs
21.5" 2.7GHz Quad-Core Intel Core i5 with 12GB RAM and 2TB HDD, 32 GB iPad 2, 32 GB iPhone 4
As a follow up, I found an applescript that works (thanks goes to the below link). I had to mess around a little with the size but

I figured I'd post it here in case anyone is interested in using it.

iThug » Applescript: Moving and Resizing Windows

Instead of using the author's suggestion though I went with one of the replies because it basically allows for only the foremost window to be resized...as opposed to a specific application.

tell application "System Events"
set frontmostApplication to name of the first process whose frontmost is true
end tell

tell application frontmostApplication
set bounds of the first window to {120, 40, 1110, 750}
end tell
 
Joined
Feb 26, 2010
Messages
2,116
Reaction score
123
Points
63
Location
Rocky Mountain High, Colorado
Your Mac's Specs
1.8 GHz i7 MBA 11" OSX 10.8.2
There is also better snap tool - made by the same guy that does better touch tool - $1.99 in the app store - helps support better touch tool. It allows snapping, move/resize with modifer-keys, and actions added to the buttons/titlebar - including restore old size. (May not help if you are having trouble with BTT forgetting size - but it is in there)

If the Apple script is working - great - just trying to get some support for Better Touch Tool as it is a great program, and better snap tool is a bargin at $1.99.
http://itunes.apple.com/us/app/bettersnaptool/id417375580?mt=12
 
OP
DaGrandMastah
Joined
Oct 19, 2011
Messages
86
Reaction score
0
Points
6
Your Mac's Specs
21.5" 2.7GHz Quad-Core Intel Core i5 with 12GB RAM and 2TB HDD, 32 GB iPad 2, 32 GB iPhone 4
There is also better snap tool - made by the same guy that does better touch tool - $1.99 in the app store - helps support better touch tool. It allows snapping, move/resize with modifer-keys, and actions added to the buttons/titlebar - including restore old size. (May not help if you are having trouble with BTT forgetting size - but it is in there)

If the Apple script is working - great - just trying to get some support for Better Touch Tool as it is a great program, and better snap tool is a bargin at $1.99.
Mac App Store - BetterSnapTool

Thanks. I actually bought that off the app store when I first bought my mac a couple of months back but I couldn't figure out what the difference is between Better Touch Tool and Better Snap Tool (i have both). I only run Better Touch Tool since it does all the stuff that Better Snap Tool does.

It is an amazingly awesome program though. The way I've been able to customize the trackpad has made a world of difference.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top