================== SwitchWindow 0.8 REXX port documentation ===============
===========================================================================
A  simple  window  tool  as  a replacement for  CBM IHelp  to be used  with
 Kickstart 2.x/3.x, written by  Roland 'Gizzy' Mainz,  freeware, all rights
 reserved.
No guarantee of any kind is made  that  the program described below in this
 document is 100% reliable. You use this material on your own risk.


============================ Misc =========================================
===========================================================================
I've thougt of the ways to control a very simple and flexible tool.
A window was the first abylity, but there was no way to connect
several functions.
A config file with an internal script language, was the second, but I
wants to change an option at runtime.
REXX, release with V2.04 of the OS, was the third way, includes the
features of the previous abylities.


===================== Changing hotkeys via runtime ========================
===========================================================================
Every hotkey of SwitchWindow is controlled from the Commodities Network.
SwitchWindow has the feature to change any hotkey description and enable
or disable seperate hotkeys.

RULES
  <command> specifies the command like 'MOVELEFT', 'SIZEPAGEUP'
            or 'WINDOWTOMOUSE'.

  <command>KEY  --> is the command to change the hotkey status
                    examples:
                      MOVELEFT --> 'MOVELEFTKEY=ENABLED'
                                     /* enables the hotkey */
                                   'MOVELEFTKEY=DISABLED'
                                     /* disables the hotkey */
                                   'MOVELEFTKEY=lcommand left'
                                     /* change the hotkey description */
  NOTE:
  If the changing of the hotkey description failed, the old value will be
  the active one.


=========================== REXX commands =================================
===========================================================================

CX_DISABLED/K.... This is a boolean switch which determines whether
                  SwitchWindow's hotkeys are disabled or not.
                  example: 'CX_DISABLED'       --> disable
                           'CX_DISABLED=TRUE'  --> disable
                           'CX_DISABLED=YES'   --> disable
                           'CX_DISABLED=FALSE' --> enable


ZIPWINDOW,
ZIPWINDOWKEY/K/A. 'zip' the window. This function is similar to the
                  window's 'ZOOM'-gadget.
                  example: 'ZIPWINDOW'
                           'ZIPWINDOWKEY=lcommand z'

MAKESMALL,
MAKESMALLKEY/K/A. Makes the window as small as possible.
                  example: 'MAKESMALL'
                           'MAKESMALLKEY=lcommand tab'

MAKEBIG,
MAKEBIGKEY/K/A... Makes the window as big as possible.
                  example: 'MAKEBIG'
                           'MAKEBIGKEY=shift lcommand tab'

CLIPTOWINDOW,
CLIPTOWINDOWKEY/K/A
                  Move the visible part of a draggable screen to the
                  window's position.
                  example: 'CLIPTOWINDOW'
                           'CLIPTOWINDOWKEY=lcommand w'

WINDOWTOCLIP,
WINDOWTOCLIPKEY/K/A
                  Change the window's position to the visible part of
                  the screen (screenclip).
                           'WINDOWTOCLIP'
                  example: 'WINDOWTOCLIPKEY=lcommand c' (DEFAULT)
MOVEUP
MOVEDOWN
MOVERIGHT
MOVELEFT
MOVEUPKEY/K/A
MOVEDOWNKEY/K/A
MOVERIGHTKEY/K/A
MOVELEFTKEY/K/A.. Moves the window in the specified direction in
                  the MOVESTEP value.
                  examples:
                    'MOVEUP'
                    'MOVEDOWN'
                    'MOVERIGHT'
                    'MOVELEFT'
                    'MOVEUPKEY=lcommand up'
                    'MOVEDOWNKEY=lcommand down'
                    'MOVERIGHTKEY=lcommand right '
                    'MOVELEFTKEY=lcommand left'

SIZEUP
SIZEDOWN
SIZERIGHT
SIZELEFT
SIZEUPKEY/K/A
SIZEDOWNKEY/K/A
SIZERIGHTKEY/K/A
SIZELEFTKEY/K/A.. Sizes the window in the specified direction.
                  examples:
                    'SIZEUP'
                    'SIZEDOWN'
                    'SIZERIGHT'
                    'SIZELEFT'
                    'SIZEUPKEY=shift lcommand up'
                    'SIZEDOWNKEY=shift lcommand down'
                    'SIZERIGHTKEY=shift lcommand right'
                    'SIZELEFTKEY=shift lcommand left'

PAGEUP
PAGEDOWN
PAGEUPKEY/K/A
PAGEDOWNKEY/K/A.. Moves the window up (down) in the window's frame height.
                  examples:'PAGEUP'
                           'PAGEDOWN'
                           'PAGEUPKEY=lcommand numericpad 9'
                           'PAGEDOWNKEY=lcommand numericpad 3'

SIZEPAGEUP
SIZEPAGEDOWN
SIZEPAGEUPKEY/K/A
SIZEPAGEDOWNKEY/K/A
                  Size the window up (or down) in the current window's
                  frame height.
                  examples:
                    'SIZEPAGEUP'
                    'SIZEPAGEDOWN'
                    'SIZEPAGEUPKEY=shift lcommand numericpad 9'
                    'SIZEPAGEDOWNKEY=shift lcommand numericpad 3'

WINDOWTOMOUSE
WINDOWTOMOUSEKEY/K/A
                  Moves the window's left top edge to the mousepointes's
                  position.
                  example: 'WINDOWTOMOUSE'
                           'WINDOWTOMOUSEKEY=lcommand numericpad 0'

WINDOWTOFRONT
WINDOWTOFRONTKEY/K/A
                  The keys to press to bring the window in front of all
                  other windows in the screen.
                  example: 'WINDOWTOFRONT'
                           'WINDOWTOFRONTKEY=lcommand f'

WINDOWTOBACK
WINDOWTOBACKKEY/K/A
                  The keys to press to send the window in back of all
                  other windows in the screen.
                  example: 'WINDOWTOBACK'
                           'WINDOWTOBACKKEY=lcommand b'

DEBIGWINDOW
DEBUGWINDOWKEY/K/A
                  The keys to press to create a requester with some
                  informations about the window (like name, width,
                  height, leftedge, topedge ... )
                  example: 'DEBUGWINDOW'
                           'DEBUGWINDOWKEY=lcommand d'

MOVESTEP/N/A..... The number of pixels in the screen's resolution to move
                  the window in every direction.
                  example: 'MOVESTEP=20'

SIZESTEP/N/A..... The number of pixels in the screen's resolution to size
                  the window in every direction.
                  example: 'SIZESTEP=20'

CHANGEWINDOWBOX/K/A
                  SYNOPSIS
                    CHANGEWINDOWBOX=<var>

                  FUNCTION
                    Change the window's box (frame) in position and
                    dimensions in absolute (not relative) coordinates.

                  INPUTS
                    <var>.LEFT    = left edge of the new window's frame
                    <var>.TOP     = top edge
                    <var>.WIDTH   = width
                    <var>.HEIGHT  = height

                  RESULTS
                    Results nothing.

                  BUGS

                  EXAMPLE
                    /* ChangeWindowBox.REXX */
                    address 'SwitchWindowRXPort'

                    BOX.LEFT = 0       /* leftedge */
                    BOX.TOP  = 0       /* topedge  */
                    BOX.WIDTH = 640    /* width    */
                    BOX.HEIGHT = 100   /* height   */

                    'CHANGEWINDOWBOX=BOX' /* call the function */


GETWINDOW/K/A -- experimental -- do not use --

WINDOW/K/A
                  SYNOPSIS
                    WINDOW=<windowname>

                  FUNCTION
                    Specifies the new targed window for every
                    SwitchWindow function called from REXX.
                    If the windowname is not valid, the activewindow
                    will be get.


                  INPUTS
                    <windowname> = the name of the window that
                                   may be activated.

                  RESULTS
                    Returns nothing.

                  BUGS
                    Does not fail if the window wasn't found.
                    Today this function need the full name.
                    In later versions of SwitchWindow (>V0.85)
                    pattern matching may be allowed.

                  EXAMPLE
                    /* Select other window.rexx */
                    address 'SwitchWindowRXPort'

                    'WINDOW=Tools'
                    moveup
                    moveleft
                    movedown
                    moveright
                    zipwindow
                    'WINDOW=xyzxx' /* select a non existing window
                                      that the next script
                                      get the standart activewindow */


ACTIVATEWINDOW/K/A
                  SYNOPSIS
                    ACTIVATEWINDOW=<windowname>

                  FUNCTION
                    Activates a window.

                  INPUTS
                    <windowname> = the name of the window that
                                   may be activated.

                  RESULTS
                    Results nothing.

                  BUGS
                    Today this function need the full name.
                    In later versions of SwitchWindow (>V0.85)
                    pattern matching may be allowed.

                  EXAMPLE
                    'ACTIVATEWINDOW=Tools'


QUIT
                  SYNOPSIS
                    QUIT

                  FUNCTION
                    Quit the tool.

                  INPUTS
                    Gets nothing.

                  RESULTS
                    Results nothing.


================================ TODO =====================================
===========================================================================
-update the REXX port
-more REXX commands
  ASYNC             - asycronous REXX mode
  SYNC              - syncronous REXX mode
  ENABLE            - enables the tool
  DISABLE           - disable the tool
  QUIET             - same as QUIET tooltype
  KILL              - same as QUIT command
  IGNORESIZEFLAG    - same as IGNORESIZEFLAG tooltype
  INITREXX          - init the REXX port
  RESET             - reset the tool
  DELAY / WAIT      - wait a specified time
  STATUS            - return the current SwitchWindow status
-some demo scripts
-Make GETWINDOW useable
-add pattern matching for every window naming
-select a window through it's address
-a better REXX error report
-a simple, short manual file (autodoc style)


=========================== Author's Request ==============================
===========================================================================
By  releasing  this program I do  not  place any obligations on you,
feel free to share this program with your  friends (and enemies).

If you want to blame me, report any bugs or want the source,
send your letter to:
                Roland Mainz
                Hohenstaufenstraße 8
                D-5164 Nörvenich
                GERMANY

But, should you feel the need to make any contributions, send them to:
                Fred Fish
                Amiga Library Disks
                1835 East Belmont Drive
                Tempe, Arizona  85284
                USA

for his great AMIGA library, and his work all over the years.


The entire  SwitchWindow  package  may  be  noncommercially redistributed,
provided  that  the package  is always  distributed in it's complete  form
(including it's documentation).  A small copy fee  for media costs is okay
but any kind of commercial distribution is strictly forbidden!
Comments  and  suggestions  how  to  improve  this  program  are generally
appreciated!

Thanks to Matt Dillon for his DICE, and Olaf 'Olsen' Barthel for his
help, ideas and some text clips from his documentations.


