Order of the Butterfly
Posts: 421 from 2003/2/24
From: Berlin
New v1.1 of
WinActionI added a LIST and QUERY option including a QueryFormat string to query just a single value or with a customize string.
The NAME option can now also be an hexaddress (f.e. 0x1B9C8F24), for windows w/o a title or multiple windows with the same name.
Code:
:00.02 [ 0] Dev:ecx/my/WinAction> WinAction ?
NAME,ACTION,LIST/S,X=LEFT/N,Y=TOP/N,W=WIDTH/N,H=HEIGHT/N,QF=QUERYFORMAT/K: ?
Perform an action to a window
NAME : Name of the window, case sensitive
ACTION: One of the actions below, not case sensitive, can be abbreviated
LIST : List all available windows
For the actions BOX, MOVE and SIZE:
X=LEFT, Y=TOP, W=WIDTH, H=HEIGHT
For QUERY action: QF=QUERYFORMAT/F
%a: address %A: hasAlpha %h: height
%H: hidden? %m: is MUI? %o: opacity
%t: title %T: screen title %w: width
%x: leftEdge %y: topEdge %z: zoom state
default is: "%t (%T) %x/%y, %wx%h, %H, HasAlpha: %A, %m, Opacity=%o, Zoomed=%z"
Possible window actions are:
ACTIVATE - activate it
BACK - put it to the back
FRONT - put it to the front
FBACK - put all windows of the same "family" to back
FFRONT - put all windows of the same "family" to front
MIN - minimize it
MAX - maximize it
RESTORE - restore size and pos
OPENMENU - open window's menu
HIDE - hide the window
SHOW - show the window
ZIP - zip the window
CLOSE - (try to) close the window (sends a IDCMP_CLOSEWINDOW)
QUERY - query values of a window, see QF=QUERYFORMAT option
Special actions with parameters
BOX - change the window's position and size (X, Y, W, H)
Example: WinAction TestWin BOX x=100 y=234 w=555 h=333
MOVE - move the window's left and top position (X, Y)
Example: WinAction TestWin MOVE x=100 y=-200
SIZE - resize the window, the values will be ADDED/SUBTRACTED! (W, H)
Example: WinAction TestWin SIZE 222 -111