Short:        Perform an action to a window
Author:       Thomas@Igracki.de
Uploader:     Thomas Igracki de
Type:         util/shell
Version:      1.4
Architecture: ppc-morphos
Distribution: Aminet
Kurz:         Führe eine Aktion an einem Fenster aus

0:00.00 [ 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, 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 window
  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

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

History:
========
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