
Jan 10, '06 05:36:00AM • Contributed by: SimonDorfman.com
You'll need to have "Enable access for assisstive devices" enabled under Universal Access in System Preferences for this script to work.
|
A script to resize frontmost two windows to fill screen
![]() Jan 10, '06 05:36:00AM • Contributed by: SimonDorfman.com
I often need to compare two windows side by side. So I wrote this AppleScript to resize the front two windows side by side, filling the screen. I have it set to run via a Quicksilver Trigger keyboard shortcut. It works in most applications.
You'll need to have "Enable access for assisstive devices" enabled under Universal Access in System Preferences for this script to work.
•
[39,800 views]
Hint Options
A script to resize frontmost two windows to fill screen
Bless you! This is one basic functionality that Windoze has that Mac hasn't had that I've missed for ages. Works great.
A script to resize frontmost two windows to fill screen
Tiger 10.4.3
A script to resize frontmost two windows to fill screen
Is there a file in /Library/Preferences called com.apple.windowserver.plist? This is where the defaults system reads the windowserver information from. If for some reason that file isn't there (might need Developer Tools installed??? or maybe it only shows up as accessible if assistive access is enabled???) then that could be why you're getting that error.
A script to resize frontmost two windows to fill screen
for a "tile vertically" script, replace the "tell application frontApp" block with this:
---
A script to resize frontmost two windows to fill screen
This still only works on the frontmost application though, not all open windows.
A script to resize frontmost two windows to fill screen
I don't have access to my web server as I'm still home from school for the break (and making changes over dial-up is very slow), so I can't post the script on my site until next week, but I'll paste the code here for now. Sorry for taking up all this space on the comments page...
Here is a beta version of a script that should tile visible (not hidden / closed) windows of all applications. It seems a little buggy, but so far has worked without error other than overlapping some windows by a few pixels.
If you find any bugs, let me know.---
A script to resize frontmost two windows to fill screen
I've done a version of the script which will work for any number of windows, ignores invisible windows and windows with no title (adium seems to have a title-less window which one can't see though it's marked as "visible"). You can specify your preference for number of columns (which defaults to 2). If you run it and there's only one window, it'll just make that one window will the screen.
Script source is here
A script to resize frontmost two windows to fill screen
Cool script. One thing wasn't working for me though:
Maybe ceil was a type-o? After some messing around, I figured out it should be changed to this:
I also added a special case if the number of windows is less than the number of columns preference.
So here's the complete script with those changes:
ignore minimized windows and fix the resizing of windows in Finder
I further hacked this script to ignore minimized windows and fix the resizing of windows in Finder due to the weird menubarHeight 44 instead of 22 bug. Here's the updated script:
ignore minimized windows and fix the resizing of windows in Finder
I dont have a /Library/Preferences/com.apple.windowserver file on my machine. What do I do to create one? Are you aware of alternative ways to get the size of the displays? Do they work with two displays?
A script to resize frontmost two windows to fill screen
Sorry, I'm new to quicksilver, Now where do i put this and how do i use it?
A script to resize frontmost two windows to fill screen
Go to the Preferences in Quicksilver. Click on Triggers in the left pane (I think this is built-in to the newest Quicksilver by default, but it may have been added by a plugin). Click the plus to add a trigger. Select the script in the Command section. Select a key combination in the Trigger section. Make sure the trigger is checked and close the Preferences window. The trigger should activate immediately.
A script to resize frontmost two windows to fill screen
I have been wanting to write a script like this for some time, but never knew where to find the window widths and heights other than manually. Thanks!
A script to resize frontmost two windows to fill screen
Just in case anyone is interested, to make this a fill window script, just change the lines that read:
by deleting the second line and changing the first line to:
---
A script to resize frontmost two windows to fill screen
Can I use this script by saving it as an application in the script editor and then executing it?
A script to resize frontmost two windows to fill screen
The script cycles through the current running application. If you run a script with Quicksilver, it does not open a new application but keeps the focus with whatever application you have at the front when you run the script. If you make a new application and run it, that application grabs the focus and becomes the front most application, the it then tries to resize itself and probably runs into issues as it has no visible window.
A script to resize frontmost two windows to fill screen
FYI:
There is absolutely NO reason why "Enable access for assisstive devices" needs to be enabled in order to use this script. That only needs to be enabled for UI scripting which this script does not do.
A script to resize frontmost two windows to fill screen
What about using Exposé for this at application level (F9 by default) or isn't this an option due to limited interactivity? Still I would think this would be good enough for a side by side comparison.
A script to resize frontmost two windows to fill screen
For what it's worth, all of the scripts in this thread try to determine the screen size by scanning through the com.apple.windowserver plist. Unfortunately, this just doesn't work if you have multiple DisplaySets.
For example, on my laptop:
% defaults read /Library/Preferences/com.apple.windowserver | grep -w Width Width = 800; Width = 1024; Width = 1024; Width = 1024; Width = 1024; Width = 1920; Width = 1024; Width = 800; Width = 800; Width = 1680; Width = 1024; Width = 1024; Width = 1024; Width = 800; Width = 1024; Width = 1024; Width = 1024; Width = 1680; Width = 800; Width = 800; Width = 800; Width = 800; Width = 1680; Width = 1024; Width = 1680; Width = 1024; Width = 800; Width = 800; Width = 1680; Width = 1024; Width = 1680; Width = 1024; Width = 1680; Width = 1024; Width = 1680; Width = 800; Width = 800;MacOS apparently remembers every display that you've used (and you can see that I have used many). What we want is to find the current display dimensions, but that's not indicated in this plist. I found a post elsewhere that asked Safari to run a JavaScript that returns screen.availHeight and screen.availWidth. Extra Suites provides an AppleScript extension with screen dimension information. I don't know a general, free solution to get the screen dimensions.
A script to resize frontmost two windows to fill screen
here's what I put in for getting the desktop size:
A script to resize frontmost two windows to fill screen
Here's a link to some great window maneuvering apple scripts:
A script to resize frontmost two windows to fill screen
Here's a link to some gerat window manipulation scripts:
A script to resize frontmost two windows to fill screen
Any Possibility to get Entourage to work with this or especially Microsoft Word?
A script to resize frontmost two windows to fill screen
Also if you simply go to the Apple in the top left and select about this mac and then get more info. Then from the left hand bar select Graphics/Displays, you can find out what your resolution is exactly.
A script to resize frontmost two windows to fill screen
Hello, |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:Hints1 new Hints in the last 24 hoursComments 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.13 seconds |