 cavemonkey50Monkey MadnessPremium join:2003-11-22 Allentown, PA | Window Size/Position on Different Monitors I just purchased myself a MacBook and was getting it setup when I noticed a minor issue. I am using the MacBook as my main machine. For the majority of the time I have it hooked up to an external monitor with a mouse and keyboard and the lid closed.
When I'm going from mobile mode (using MacBook's display) to desktop mode (external LCD), my windows show up all small on the external monitor. My monitor and the MacBook run in different resolutions (MacBook - 1280x800, Monitor - 1280x1024), so the windows display all small on the monitor. I then readjust them for the external monitor, and when I switch back to mobile mode my windows are huge on the MacBook.
So, is there anyway I can have different window sizes for different resolutions and have the application remember its position on each different monitor between switches? The main application I'm concerned with is my web browser Camino. Is there an Apple script that could accomplish this? -- Xbox Live Gamertag: cm50 |
|
 cavemonkey50Monkey MadnessPremium join:2003-11-22 Allentown, PA | Hasn't anyone else run into this problem? I was able to write a script for Camino using CamiScript that resizes the window, but I'm still looking for a better solution if someone has one. -- Xbox Live Gamertag: cm50 |
|
|
|
 JohnnyPremium join:2001-06-27 Atlanta, GA kudos:1 | reply to cavemonkey50 You could have a script that
1) Loops through every visible process. 2) Within each process, loops through every visible window. 3) For each window, triggers the green button (the "Zoom" button).
Try this manually and see if hitting the green button will fit the windows to the size of the screen they are on. I don't have that setup so I can't test it.
It may require some GUI scripting, which is a little more tedious than straight AppleScript.
If the green button works, let us know and we'll see what can be scripted. |
|
 JohnnyPremium join:2001-06-27 Atlanta, GA kudos:1 | reply to cavemonkey50 This works, for 30 out of 45 open windows that list themselves as having a programmatically clickable zoom button: Click HERE to load the script into Script Editor
tell application "System Events" set theProcesses to every process whose visible is true repeat with theProcess in theProcesses tell theProcess set theWindows to every window repeat with theWindow in theWindows set theButtons to (buttons of theWindow) repeat with theButton in theButtons try if (subrole of theButton) is "AXZoomButton" then click theButton end try end repeat end repeat end tell end repeat end tell |
|
 cavemonkey50Monkey MadnessPremium join:2003-11-22 Allentown, PA | Thanks for the script, but clicking the zoom button won't solve my issue. My problem lies more with the position of the window, and not the size.
I seem to be quite content the past day just fixing the browser window with my CamiScript. I am very picky about my browser window, and I guess that was the main issue. So, for now I guess we can put this to rest unless someone has experienced this problem in the past and has a solution. -- Xbox Live Gamertag: cm50 |
|