|
|
some suggestions..
u can apply a script to the frontmost application:
tell frontmost applicationwhy check for n==0 when you later do if(n>0)? just move everything after ur return inside the if (and everything else 4 that matter...i hate redundant code;-) if (n > 0) then -- Dividing by zero is bad tell application "Finder" set screenSize to bounds of window of desktop set screenWidth to item 3 of screenSize set screenHeight to item 4 of screenSize end tell set windowWidth to screenWidth / n activate -- Position each window in turnand applescript's repeat is full-featured: u don't have 2 code an exit repeat...
repeat with x from 1 to n
tell window x to set bounds to {windowWidth * (x - 1), 0, windowWidth * x, screenHeight}
end repeat
end if
u also might want to set a lower bound on the width...
some suggestions..
Yeah, I meant to take the check for if zero return bit out when I put the if n >0 in, but I overlooked it. Also, thanks for the tip on the repeat. The only problem with frontmost application I have come across is that some applications do not respond well to the current code. I personally only have a use for it with Safari. Anything more than around five windows becomes insanely useless, so I am not sure what good a minimum width would accomplish... baba, i will look into it : ) |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysNo new commentsLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.09 seconds |
|