Welcome to MorphOS-Storage, a webserver dedicated to MorphOS users. ©2016-2024 Meta-MorphOS.org
Description:Perform an action to a window
Developer/Porter:Thomas Igracki
Readme:
Short: Perform an action to a window
Kurz: Führe eine Aktion an einem Fenster aus
Author: Thomas@Igracki.de
Uploader: Thomas@Igracki.de
Version: 1.5
Type: util/shell
Architecture: ppc-morphos
Distribution: Aminet

0:00.00 [ 0] Dev:ecx/my/WinAction> WinAction ?
NAME,ACTION,LS=LIST/S,LM=LISTMUI/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
LISTMUI : List running MUI applications

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, Hidden: %H, IsMUI: %m, Zoomed: %z, HasAlpha: %A, Opacity=%o"

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
ICONIFY - iconify a MUI application
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

Example output of LIST and LISTMUI:
===================================
0:29.94 [ 5] Dev:ecx/my/WinAction> WinAction ls lm

SCREEN "Workbench Screen" RadeonX1900GT 24Bit 1920 x 1080 [68.625kHz, 61Hz] (0/0, 1920x1080x8):
WINDOW [ 819/ 57, 1059x 882] "Iris" (0x37AC46BC)
WINDOW [ 24/ 48, 1131x 908] "Flow Development Studio" (0x27298CD4)
WINDOW [ 0/ 952, 24x 128] "" (0x1E2BCCD4)
WINDOW [ 881/ 21, 64x 32] "" (0x1ED16504)
WINDOW [ 0/ 96, 24x 464] "" (0x1EC79E04)
WINDOW [ 27/1048, 1161x 32] "" (0x1E2ED464)
WINDOW [ 80/ 770, 830x 262] "MorphOS Shell" (0x1E6FE98C)
WINDOW [ 0/ 548, 24x 416] "" (0x1E0DC494)
WINDOW [1346/1031, 492x 48] "" (0x1E62188C)
WINDOW [1896/ 184, 24x 896] "" (0x1DF2937C)
WINDOW [ 0/ 22, 1920x1058] "" (0x18DD6B34)

SCREEN "Other Monitor" RadeonX1900GT.1 24Bit 1920x1080 [66.660kHz, 60Hz] (0/0, 1920x1080x8):
WINDOW [ 80/ 630, 520x 107] "Network" (0x2A27F21C)

SCREEN "Wayfarer" RadeonX1900GT 24Bit 1920 x 1080 [68.625kHz, 61Hz] (0/0, 1920x1080x8):
WINDOW [ 769/ 519, 245x 110] "" (0x37FE4504)
WINDOW [ 0/ 22, 1581x1057] "Wayfarer" (0x2579B634)

MUIAPPS
SCREENMANAGER "Intuition Screen Manager"
POPO.1 "PoPo -- Poseidon Popup Provider"
AMBIENT "Ambient"
NETFS_POPUP "NetFS-PopUp"
MCON.1 "MUI Console"
MIXER "Mixer"
MAGICBEACON "MagicBeacon"
EXPOSE "Expose"
MCON.2 "MUI Console"
WAYFARER "Wayfarer"
FLOWSTUDIO.1 "Flow Development Studio"
IRIS "Iris"

Todo:
=====
- Pattern support for the name of the window

History:
========
15-Aug-2024: v1.5
Chg: LIST now only show screens and windows again
New: LISTMUI shows only running MUI apps, you can specify both together
f.e. WinAction LIST LISTMUI
Chg: LISTMUI: The basename will be displayed first
Rem: Removed the workaround for a ZapperNG bug, that only the zips the
active window (ZapperNG v1.3 fixed this bug)

09-Aug-2024: v1.4
Chg: ICONIFY: if the MUI app of a window can't be found, use the NAME
argument as the basename of a MUI app to find its app object
Finally Easy2Install can be iconified;)
This also can be used to Uniconify a MUI app!
NEW: LIST now also shows a list of MUI apps, the second entry is the basename

08-Aug-2024: v1.3
New: added an ICONIFY action to iconify a mui window

08-Aug-2024: v1.2
Fix: QUERY command truncated window's title (and window's screentitle)
[reported by jPV]
Chg: QUERY output is now more consistent (Yes/No for all properties)
[suggested by jPV]
Chg: Changed default QUERYFORMAT to reflect the changes in QUERY

07-Aug-2024: v1.1
New: added LIST option to list all available windows
Chg: NAME option can now also be an hexaddress (f.e. 0x1B9C8F24)
New: added QUERY action, see above

05-Aug-2024: v1.0
New: more actions: ACTIVATE, BACK, FRONT, FBACK, FFRONT, MIN, MAX,
RESTORE, OPENMENU, ZIP, CLOSE
New: special actions with parameters: BOX, MOVE, SIZE

04-Aug-2024: v0.1
- first version with just Hide and Show

Upload Date:Aug 15 2024
Category:Ambient/Utilities
Download:WinAction_1.5.lha
Md5:de70569d907ac7b9585fd490b31f24f0
Size:9 KB
Downloads:71
Screenshot(s)
 
History
Last Comments