|
| ||||||
|
UEPosUEPos version 1.2, 3/7/2008© 2003-2008 Pallium, all rights reserved worldwide. Written by Bryan K. Ressler, Pallium Consulting Services What Is UEPos?UEPos is a small utility program that can move and resize document windows in the excellent UltraEdit text editor. By configuring some UltraEdit "Tools", you can invoke UEPos to move and size windows with keyboard shortcuts. In turn, by using UltraEdit's "RunTool" macro command, you can move and size windows from within macros. DownloadingYou can get UEPos from the downloads page. InstallationUEPos is distributed as a ZIP archive. To open the archive, you'll need a utility like WinZip or WinRAR. To install UEPos, simply unzip the distribution ZIP file into the same directory where UltraEdit is installed. By default, this is C:\Program Files\UltraEdit. Then follow the directions below to create some UltraEdit Tool definitions that run UEPos to position your windows. UseThe easiest way to use UEPos is to create one or more Tool definitions that run UEPos to position and size UltraEdit document windows into predefined locations. To define an UltraEdit Tool that runs UEPos, do this:
The Predefined PositionsThe figure below shows what the first three predefined positions would be for a large UltraEdit window (perhaps 1600 pixels wide).
Specifically, the predefined positions start at the left edge of UltraEdit's document area, are 515 pixels wide, and are the full height of the document area. Position 2 is exactly adjacent to position 1, etc., until the first window position where the window would be completely off the right edge of the screen. At that point, the windows start appearing overlapped with Position 1, but offset by 1/5 of the window width. The window width and height can be easily controlled with extra parameters on the UEPos command line. For instance, to use the standard positioning scheme, but with 600-pixel wide windows, you'd use uepos -pos 1 -width 600 The height can be controlled similarly with the -height option. Absolute PositioningYou can ignore the predefined window positions completely and have UEPos put windows exactly where you want them. To get UEPos to do this, use all four of the options -left, -top, -width, and -height. For instance, to put the active document at (100, 150) and make it 300 pixels wide and 400 pixels tall, you'd use this command line: uepos -left 100 -top 150 -width 300 -height 400 UEPos OptionsHere's part of UEPos usage output. To get this, you can open a command window, change directory to the location of UEPos.exe, and run UEPos with no options on the command line. Usage: UEPos [options] Options: -pos <n> Position to standard position (n is 1 or more) -left <l> Position window to left coordinate <l> -top <t> Position window to top coordinate <t> -width <w> Set window width to <w> -height <h> Set window height to <h> -leftextra <le> Add additional <le> to window left -rightextra <re> Add additional <re> to window right -topextra <te> Add additional <te> to window top -bottomextra <be> Add additional <be> to window bottom -nosafety Don't adjust windows to ensure visibility -pos <n>The -pos option tells UEPos which predefined position you want. The argument is an integer of 1 or more. If the -pos option is present, -left and -top are ignored. The exact dimensions of the window depend on whether -width and/or -height are specified. If neither are given, the window will be 515 pixels wide, and the full height of the UltraEdit document area. -left <l>The -left option tells UEPos to position the active window at the given horizontal offset from the left edge of UltraEdit's document area. The argument is an integer which may be negative. This option is often used in conjunction with the -top option to control the exact position of a window. This option is ignored if the -pos option is present. -top <t>The -top option tells UEPos to position the active window at the given vertical offset from the top edge of UltraEdit's document area. The argument is an integer which may be negative. This option is often used in conjunction with the -left option to control the exact position of a window. This option is ignored if the -pos option is present. -width <w>The -width option tells UEPos to size the active window to the given width in pixels. The argument is a positive integer. If a -width option is not given, UEPos defaults to 515 pixels. The -width option can be used in conjunction with the -pos option to provide "predefined" window position, but with a different width than the default. -height <h>The -height option tells UEPos to size the active window to the given height in pixels. The argument is a positive integer. If a -height option is not given, UEPos defaults to the full height of the UltraEdit document area. The -height option can be used in conjunction with the -pos option to provide "predefined" window positioning, but with a specific height instead of the default. -leftextra <le>The -leftextra option adds a constant to the left coordinate of the final window position. This can be used to "tweak" windows so that the text area is maximized by overlapping the windows in the standard positions. For instance if you use a standard theme in Windows XP, the options: -leftextra -4 -topextra -8 -bottomextra 6can be used to push the top, left, and bottom edges of a window out from a preset position such that an extra line of text may be visible, depending on your font and size choice. -rightextra <re>The -rightextra option adds a constant to the right coordinate of the final window position. This can be used to "tweak" windows so that the text area is maximized by overlapping the windows in the standard positions. See the example in -leftextra above. -topextra <te>The -topextra option adds a constant to the top coordinate of the final window position. This can be used to "tweak" windows so that the text area is maximized by overlapping the windows in the standard positions. See the example in -leftextra above. -bottomextra <be>The -bottomextra option adds a constant to the bottom coordinate of the final window position. This can be used to "tweak" windows so that the text area is maximized by overlapping the windows in the standard positions. See the example in -leftextra above. -nosafetyThe -nosafety flag allows you to use UEPos to position windows absolutely anywhere you'd like, including locations that are not visible at all (that is, completely outside the UltraEdit document area). Normally UEPos adjusts the final window position such that at least 4 pixels of the window's title bar are visible. The -nosafety flag turns off this default behavior. Be careful with this option, because once a window is moved to an invisible location, there's no way to manually move it back. (Note that you can always activate the window by choosing it from the UltraEdit Window menu, then use 'uepos -pos 1' to slam the window back into UltraEdit's document area.) Version History
How Does UEPos Work?
(This technical description is only for the curious. Others may safely ignore.
| ||||||