The Omni Group
These forums are now read-only. Please visit our new forums to participate in discussion. A new account will be required to post in the new forums. For more info on the switch, see this post. Thank you!

Go Back   The Omni Group Forums > OmniOutliner > OmniOutliner 3 for Mac
FAQ Members List Calendar Today's Posts

 
Automatically resizing and positioning a OmniOutliner window Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
When I'm working with a single monitor I often have OO3 as a full-height window in the right-hand third of the screen, and some other application in the left-hand two thirds. (Taking notes, or working through some kind of list in OO3).

Here is a script which will resize and reposition the selected window (of any application, as it happens) to the rightmost third of the screen.

Edit the 1st four property values to get the window size and position that you want. (I personally use 3 or 4 of these scripts, with keystrokes assigned to each).

Code:
-- SET SIZE AND POSITION OF SELECTED WINDOW (ANY APPLICATION)

-- NB:
-- 		1. only for single monitor setups 
--		2. Not all windows can be arbitrarily resized )

-- EXAMPLE: A full-height window, rightmost third of the screen:

-- POSITION (origin: top left)
property pPosnAcross : 2 / 3
property pPosnDown : 0

-- SIZE (units: proportion of the desktop)
property pSizeAcross : 1 / 3
property pSizeDown : 1

property pMenuHeight : 22

tell application id "com.apple.finder"
	tell window of desktop
		set {_, _, lngwidth, lngHeight} to bounds
		set lngHeight to lngHeight - pMenuHeight
	end tell
end tell

tell application id "com.apple.systemevents"
	tell front window of (first application process where frontmost = true)
		set position to {pPosnAcross * lngwidth, (pPosnDown * lngHeight) + pMenuHeight}
		set size to {pSizeAcross * lngwidth, pSizeDown * lngHeight}
	end tell
end tell

Last edited by RobTrew; 2011-01-26 at 11:01 AM..
 
 




Similar Threads
Thread Thread Starter Forum Replies Last Post
Stupid Newbie Question: Automatically resizing shapes and text Turtleboy OmniGraffle General 1 2010-01-14 04:11 PM
Omnioutliner not locating search results in main text window ncdasa OmniOutliner 3 for Mac 1 2009-05-15 10:27 PM
Resizing Window Everytime Omni Opens ? Loveanale OmniWeb General 1 2007-06-05 09:44 PM
Window resizing bug? Agnostus OmniGraffle General 0 2006-09-06 12:36 AM
Option to Prevent Sites from Resizing Main Window danlurie OmniWeb Feature Requests 3 2006-05-15 05:33 PM


All times are GMT -8. The time now is 05:14 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.