
                               SYSSET V1.2

                                    by

                              Paul Ratcliffe
                               (c) June 2000


This program contains an OS/2 WPS class which give the ability to set up
systems components such as Keyboard, Mouse and System from a REXX command
file. The program is freeware and as such:

             USE OF THIS PROGRAM IS ENTIRELY AT YOUR OWN RISK.


INSTALLATION

Unzip the archive contents into a directory which is on your LIBPATH.
Change the current directory to where you unzipped the files and run the
supplied REXX command file (obviously, this requires REXX support to be
installed) to register the class:

    sysset i

You do NOT need to restart the Workplace Shell.


DEINSTALLATION

Change the current directory to where the files are installed and run the
supplied REXX command file to deregister the class:

    sysset u

You can then delete the files SYSSET.DLL and SYSSET.CMD .


OPERATION

The program controls objects such as Keyboard, Mouse and System in the
System Setup folder via REXX scripts - there is no other user interface.
Two sample scripts are included - PRINTSCR.CMD shows how to enable, disable
and query the PrintScreen setting; SETTINGS.CMD is a generic script which
allows you to set or query any setting on any of the supported objects.

If you decide to write your own scripts, then controlling other objects is
a simple matter of substituting the appropriate parameters from the
following list.
You need to make sure all the parameters are consistent and that they are
typed exactly as shown. All strings are case-sensitive.
Some settings have a high word and a low word - you need to multiply the
high word setting by 65536 and add it to the low word setting, then using
the combined value as the argument.

The program works by communicating using the Setup strings supplied to the
<SYSSET> object via the REXX SysSetObjectData function.
There are 4 keywords which can be used in the object's Setup string:

SETOBJECT=objectid
  is used to specify which WPS object you want to manipulate.
  objectid is a standard WPS object ID enclosed in <>.

SETPARAM=settingname
  is used to specify which setting of the object you want to set/query.
  See below.

SETVAL=value
  is used to specify the value for the setting.
  See below.

QUERYVAL=inikey
  is used to specify an INI file key for use when querying the setting.
  The data is put into the OS2.INI file under application 'Sysset' and the
  specified key.
  The key should be deleted by the user after the data is retrieved to
  prevent junk from accumulating in the INI file.

If the QUERYVAL setting is present in the Setup string, then it will
override any SETVAL setting i.e. the set operation will not be performed.

Examples of Setup strings:
  Turn Print Screen on:
    'SETOBJECT=<WP_SYSTEM>;SETPARAM=PrintScreen;SETVAL=1'

  Make Mouse left handed:
    'SETOBJECT=<WP_MOUSE>;SETPARAM=ButtonSetup;SETVAL=1'

  Set Keyboard repeat rate to 15:
    'SETOBJECT=<WP_KEYB>;SETPARAM=KeyRepeatRate;SETVAL=15'

  Set Keyboard Popup Menu key to Ctrl-F10:
    'SETOBJECT=<WP_KEYB>;SETPARAM=PopupMenuKey;SETVAL=17956905'
    (17956905 = 65536 * (256 + 16 + 2) + 41)

  Query Print Screen setting:
    'SETOBJECT=<WP_SYSTEM>;SETPARAM=PrintScreen;QUERYVAL=PrtScr'


SYSTEM SETTINGS

Common definitions

  AF_ALT                    32
  AF_CONTROL                16
  AF_KBDCOMMAND            ???
  AF_SHIFT                   8
  AF_VIRTUALKEY              2
  INP_ALT                   32
  INP_CTRL                  16
  INP_NONE                   0
  INP_SHIFT                  8
  VK_END                    19
  VK_ENTER                  30
  VK_F1                     32
  VK_F2                     33
  VK_F3                     34
  VK_F4                     35
  VK_F5                     36
  VK_F6                     37
  VK_F7                     38
  VK_F8                     39
  VK_F9                     40
  VK_F10                    41
  VK_F11                    42
  VK_F12                    43
  VK_HOME                   20
  VK_INSERT                 26
  VK_PAGEDOWN               18
  VK_PAGEUP                 17
  VK_TAB                     6
  WM_BUTTON1CLICK         1043
  WM_BUTTON1DBLCLK         115
  WM_BUTTON1MOTIONSTART   1041
  WM_BUTTON2CLICK         1046
  WM_BUTTON2DBLCKL         118
  WM_BUTTON2MOTIONSTART   1044
  WM_CHORD                1040

Definitions for <WP_SYSTEM>

  ANIMATION_OFF              0
  ANIMATION_ON               1
  ANIMATION_DEFAULT          2
  CONFIRM_OFF                0
  CONFIRM_ON                 1
  CONFIRM_DEFAULT            2
  CCVIEW_DEFAULT             0
  CCVIEW_ON                  1
  CCVIEW_OFF                 2
  DISPLAY_OFF                0
  DISPLAY_ON                 1
  DISPLAY_DEFAULT            2
  LOGO_DEFAULT              -2
  LOGO_INDEFINITE           -1
  LOGO_NONE                  0
  BUTTON_HIDE                1
  BUTTON_MINIMIZE            2
  BUTTON_DEFAULT             3
  MINWIN_DEFAULT             0
  MINWIN_HIDE                1
  MINWIN_VIEWER              2
  MINWIN_DESKTOP             3
  NAMECLASH_DEFAULT         64
  NAMECLASH_RENAME           2
  NAMECLASH_REPLACE          8
  NAMECLASH_PROMPT          16
  PRINTSCREEN_OFF            0
  PRINTSCREEN_ON             1
  PRINTSCREEN_DEFAULT        2

Settings for <WP_SYSTEM>

  Ŀ
  Setting                    Value                  Description         
  Ĵ
  Animation                  ANIMATION_ON           Enables animation   
                                                    when a window is    
                                                    created or          
                                                    maximized.          
  Ĵ
                             ANIMATION_OFF          Disables animation  
                                                    when a window is    
                                                    created or          
                                                    maximized.          
  Ĵ
                             ANIMATION_DEFAULT      Sets the default    
                                                    window animation    
                                                    setting.            
  Ĵ
  ConfirmCopyMoveCreateShadowCONFIRM_ON             Displays a          
                                                    confirmation when a 
                                                    copy, move, or      
                                                    create shadow       
                                                    operation occurs.   
  Ĵ
                             CONFIRM_OFF            Does not display a  
                                                    confirmation when a 
                                                    copy, move, or      
                                                    create shadow       
                                                    operation occurs.   
  Ĵ
                             CONFIRM_DEFAULT        Sets the default    
                                                    confirmation display
                                                    setting.            
  Ĵ
  ConfirmFolderDelete        CONFIRM_ON             Displays a          
                                                    confirmation when a 
                                                    folder is deleted.  
  Ĵ
                             CONFIRM_OFF            Does not display a  
                                                    confirmation when a 
                                                    folder is deleted.  
  Ĵ
                             CONFIRM_DEFAULT        Sets the default    
                                                    confirmation display
                                                    setting.            
  Ĵ
  ConfirmObjectDelete        CONFIRM_ON             Displays a          
                                                    confirmation when an
                                                    object is deleted.  
  Ĵ
                             CONFIRM_OFF            Does not display a  
                                                    confirmation when an
                                                    object is deleted.  
  Ĵ
                             CONFIRM_DEFAULT        Sets the default    
                                                    confirmation display
                                                    setting.            
  Ĵ
  ConfirmRenameFileExtension CONFIRM_ON             Displays a          
                                                    confirmation when a 
                                                    file or extension is
                                                    renamed.            
  Ĵ
                             CONFIRM_OFF            Does not display a  
                                                    confirmation when a 
                                                    file or extension is
                                                    renamed.            
  Ĵ
                             CONFIRM_DEFAULT        Sets the default    
                                                    confirmation display
                                                    setting.            
  Ĵ
  ConcurrentView             CCVIEW_ON              Turns concurrent    
                                                    view mode on.       
  Ĵ
                             CCVIEW_OFF             Turns concurrent    
                                                    view mode off.      
  Ĵ
                             CCVIEW_DEFAULT         Sets the concurrent 
                                                    view mode to the    
                                                    default.            
  Ĵ
  DisplayProgressIndicator   DISPLAY_ON             Displays a progress 
                                                    indicator.          
  Ĵ
                             DISPLAY_OFF            Does not display    
                                                    progress indicator. 
  Ĵ
                             DISPLAY_DEFAULT        Sets the default    
                                                    progress indicator  
                                                    display setting.    
  Ĵ
  LogoDisplayTime            LOGO_INDEFINITE        Displays the logo   
                                                    indefinitely.       
  Ĵ
                             LOGO_NONE              Does not display the
                                                    logo.               
  Ĵ
                             time                   Displays the logo   
                                                    for a given period  
                                                    of time. This value 
                                                    must be in the range
                                                    0 to 32767          
                                                    milliseconds.       
  Ĵ
                             LOGO_DEFAULT           Sets the default    
                                                    logo display time.  
  Ĵ
  MinButtonAppearance        BUTTON_HIDE            Sets views of this  
                                                    object to have a    
                                                    hide button as      
                                                    opposed to a        
                                                    minimize button.    
  Ĵ
                             BUTTON_MINIMIZE        Sets views of this  
                                                    object to have a    
                                                    minimize button as  
                                                    opposed to a hide   
                                                    button.             
  Ĵ
                             BUTTON_DEFAULT         Sets the default    
                                                    minimize button     
                                                    appearance setting. 
  Ĵ
  MinButtonBehavior          MINWIN_HIDE            Hides the view of an
                                                    object when its     
                                                    minimize button is  
                                                    selected.           
  Ĵ
                             MINWIN_VIEWER          Minimizes the view  
                                                    of an object to the 
                                                    minimized window    
                                                    viewer when its     
                                                    minimize button is  
                                                    selected.           
  Ĵ
                             MINWIN_DESKTOP         Minimizes the view  
                                                    of an object to the 
                                                    Desktop when its    
                                                    minimize button is  
                                                    selected.           
  Ĵ
                             MINWIN_DEFAULT         Sets the default    
                                                    minimize button     
                                                    behavior setting.   
  Ĵ
  NameClash                  NAMECLASH_PROMPT       Displays a dialog   
                                                    when an object is   
                                                    created, copied or  
                                                    moved to a folder   
                                                    which contains      
                                                    another object with 
                                                    the same name.      
  Ĵ
                             NAMECLASH_RENAME       Renames an object   
                                                    when it is created, 
                                                    copied or moved to a
                                                    folder which        
                                                    contains another    
                                                    object with the same
                                                    name.               
  Ĵ
                             NAMECLASH_REPLACE      Replaces the        
                                                    existing object with
                                                    the new object when 
                                                    an object is        
                                                    created, copied or  
                                                    moved to a folder   
                                                    which contains      
                                                    another object with 
                                                    the same name.      
  Ĵ
                             NAMECLASH_DEFAULT      Sets the default    
                                                    setting for handling
                                                    name clashes.       
  Ĵ
  PrintScreen                PRINTSCREEN_ON         Enables printing    
                                                    when the print      
                                                    screen key is       
                                                    pressed.            
  Ĵ
                             PRINTSCREEN_OFF        Disables printing   
                                                    when the print      
                                                    screen key is       
                                                    pressed.            
  Ĵ
                             PRINTSCREEN_DEFAULT    Sets the default    
                                                    setting when the    
                                                    print screen key is 
                                                    pressed.            
  


KEYBOARD SETTINGS

Definitions for <WP_KEYB>

  CURSORBLINK_DEFAULT       -1
  CURSORBLINK_MAX          890
  CURSORBLINK_MIN            0
  TEXTEDITKEY_DEFAULT        0
  REPEATDELAY_DEFAULT       -1
  REPEATDELAY_MAX          890
  REPEATDELAY_MIN            0
  REPEATRATE_DEFAULT         0
  REPEATRATE_MAX            20
  REPEATRATE_MIN             1
  POPUPKEY_DEFAULT           0

Settings for <WP_KEYB>

  Ŀ
  Setting          Value                Description                 
  Ĵ
  CursorBlinkRate  rate                 Sets the rate at which the  
                                        cursor blinks.              
                                        This value must be in the   
                                        range CURSORBLINK_MIN to    
                                        CURSORBLINK_MAX.            
  Ĵ
                   CURSORBLINK_DEFAULT  Sets the default rate at    
                                        which the cursor blinks.    
  Ĵ
  EditTitleTextKey AF_VIRTUALKEY        High word. Sets the key used
                   AF_KBDCOMMAND        with another key to edit    
                                        button text.                
                                        Both of these values are    
                                        required if the default is  
                                        not set.                    
  Ĵ
                   AF_ALT               High word. Sets the key used
                   AF_SHIFT             with another key to edit    
                   AF_CONTROL           button text.                
                                        These are optional values.  
  Ĵ
                   VK_F1 through VK_F12 Low word. Sets the key used 
                   VK_PAGEUP            to edit button text.        
                   VK_PAGEDOWN          One of these values is      
                   VK_HOME              required if the default is  
                   VK_END               not set.                    
                   VK_INSERT                                        
                   VK_TAB                                           
                   VK_ENTER                                         
  Ĵ
                   TEXTEDITKEY_DEFAULT  Sets the default text edit  
                                        key.                        
  Ĵ
  KeyRepeatDelay   rate                 Sets the time before the key
                                        starts repeating. This value
                                        must be in the range        
                                        REPEATDELAY_MIN to          
                                        REPEATDELAY_MAX.            
  Ĵ
                   REPEATDELAY_DEFAULT  Sets the default time before
                                        the key starts repeating.   
  Ĵ
  KeyRepeatRate    rate                 Sets the rate at which a key
                                        repeats. This value must be 
                                        in the range REPEATRATE_MIN 
                                        to REPEATRATE_MAX.          
  Ĵ
                   REPEATRATE_DEFAULT   Sets the default rate at    
                                        which a key repeats.        
  Ĵ
  PopupMenuKey     AF_VIRTUALKEY        High word. Sets the key used
                   AF_KBDCOMMAND        with another key to display 
                                        the pop-up menu.            
                                        Both of these values are    
                                        required if the default is  
                                        not set.                    
  Ĵ
                   AF_ALT               High word. Sets the key used
                   AF_SHIFT             with another key to display 
                   AF_CONTROL           the pop-up menu.            
                                        These are optional values.  
  Ĵ
                   VK_F1 through VK_F12 Low word. Sets the key used 
                   VK_PAGEUP            to display the pop-up menu. 
                   VK_PAGEDOWN          One of these values is      
                   VK_HOME              required if the default is  
                   VK_END               not set.                    
                   VK_INSERT                                        
                   VK_TAB                                           
                   VK_ENTER                                         
  Ĵ
                   POPUPKEY_DEFAULT     Sets the default popup menu 
                                        key.                        
  


MOUSE SETTINGS

Definitions for <WP_MOUSE>

  BUTTONS_RIGHTHANDED        0
  BUTTONS_LEFTHANDED         1
  BUTTONS_DEFAULT            2
  WINDOWLISTBUTTON_DEFAULT   0
  DOUBLECLICK_DEFAULT        0
  DRAGBUTTON_DEFAULT         0
  TEXTEDITBUTTON_DEFAULT     0
  POPUPBUTTON_DEFAULT        0
  TRACKING_DEFAULT           0

Settings for <WP_MOUSE>

  Ŀ
  Setting                 Value                    Description     
  Ĵ
  ButtonSetup             BUTTONS_LEFTHANDED       Sets the mouse  
                                                   buttons for a   
                                                   left-handed     
                                                   person.         
  Ĵ
                          BUTTONS_RIGHTHANDED      Sets the mouse  
                                                   buttons for a   
                                                   right-handed    
                                                   person.         
  Ĵ
                          BUTTONS_DEFAULT          Sets the default
                                                   setup for the   
                                                   mouse buttons.  
  Ĵ
  DisplayWindowListButton INP_NONE                 High word.      
                                                   This value is   
                                                   required if the 
                                                   default is not  
                                                   set.            
  Ĵ
                          WM_BUTTON2CLICK          Low word. Sets  
                          WM_CHORD                 the button which
                                                   displays the    
                                                   window list.    
                                                   One of these    
                                                   values is       
                                                   required if the 
                                                   default is not  
                                                   set.            
  Ĵ
                          WINDOWLISTBUTTON_DEFAULT Sets the default
                                                   button which    
                                                   displays the    
                                                   window list.    
  Ĵ
  DoubleClickTime         time                     Sets the time   
                                                   between mouse   
                                                   clicks. Higher  
                                                   values allow    
                                                   more time       
                                                   between mouse   
                                                   clicks, where as
                                                   lower values    
                                                   allow less time 
                                                   between mouse   
                                                   clicks.         
                                                   This value must 
                                                   be in the range 
                                                   170 to 1 060.   
  Ĵ
                          DOUBLECLICK_DEFAULT      Sets the default
                                                   time between    
                                                   mouse clicks.   
  Ĵ
  DragObjectButton        INP_NONE                 High word.      
                                                   This value is   
                                                   required if the 
                                                   default is not  
                                                   set.            
  Ĵ
                          WM_BUTTON1MOTIONSTART    Low word. Sets  
                          WM_BUTTON2MOTIONSTART    the button which
                                                   drags objects.  
                                                   One of these    
                                                   values is       
                                                   required if the 
                                                   default is not  
                                                   set.            
  Ĵ
                          DRAGBUTTON_DEFAULT       Sets the button 
                                                   which drags     
                                                   objects to the  
                                                   default.        
  Ĵ
  EditTitleTextButton     INP_ALT                  High word. Sets 
                          INP_CTRL                 the key used    
                          INP_NONE                 with a mouse    
                          INP_SHIFT                button to edit  
                                                   button text.    
                                                   One of these    
                                                   values is       
                                                   required if the 
                                                   default is not  
                                                   set.            
  Ĵ
                          WM_BUTTON1CLICK          Low word. Sets  
                          WM_BUTTON2CLICK          the mouse button
                          WM_BUTTON1DBLCLK         used to edit    
                          WM_BUTTON2DBLCKL         button text.    
                                                   One of these    
                                                   values is       
                                                   required if the 
                                                   default is not  
                                                   set.            
  Ĵ
                          TEXTEDITBUTTON_DEFAULT   Sets the text   
                                                   edit button to  
                                                   the default.    
  Ĵ
  PopupMenuButton         INP_ALT                  High word. Sets 
                          INP_CTRL                 the key used    
                          INP_NONE                 with a mouse    
                          INP_SHIFT                button to       
                                                   display pop-up  
                                                   menus.          
                                                   One of these    
                                                   values is       
                                                   required if the 
                                                   default is not  
                                                   set.            
  Ĵ
                          WM_BUTTON1CLICK          Low word. Sets  
                          WM_BUTTON2CLICK          the mouse button
                          WM_BUTTON1DBLCLK         used to display 
                          WM_BUTTON2DBLCKL         pop-up menus.   
                          WM_CHORD                 One of these    
                                                   values is       
                                                   required if the 
                                                   default is not  
                                                   set.            
  Ĵ
                          POPUPBUTTON_DEFAULT      Sets the default
                                                   key and mouse   
                                                   button used to  
                                                   display pop-up  
                                                   menus.          
  Ĵ
  TrackingSpeed           speed                    Sets the mouse  
                                                   tracking speed. 
                                                   This value must 
                                                   be in the range 
                                                   1 to 7, where 1 
                                                   is the fastest  
                                                   value.          
  Ĵ
                          TRACKING_DEFAULT         Sets the default
                                                   mouse tracking  
                                                   speed.          
  


ANOMALIES

For unknown reasons I cannot get the following settings to work correctly
on my Warp 3 (FP 37) system:

  The IBM documentation says the concurrent view setting for <WP_SYSTEM> is
  CurrentView, whereas it is actually ConcurrentView.

  Querying <WP_SYSTEM> Animation always returns Failure. Setting works
  without a problem.

  The value AF_KBDCOMMAND does not appear to be documented anywhere.
  Perhaps IBM meant to put AF_SYSCOMMAND ?

  Querying <WP_KEYB> EditTitleTextKey returns with bit 8 set (256 added) in
  the high word. This bit corresponds to AF_SYSCOMMAND which would seem to
  confirm the previous anomaly.
  Also, the value returned doesn't seem to track the setting in the WPS
  user interface.

  Setting <WP_KEYB> EditTitleTextKey appears to have no effect. The value
  returned by a Query matches the value that is set, but nothing changes in
  the WPS user interface.

  Setting <WP_KEYB> PopupMenuKey always returns Failure, but the Setting
  seems to take effect.

  Querying <WP_MOUSE> EditTitleTextButton returns WM_BUTTON1DOWN (113) or
  WM_BUTTON2DOWN (116) in the low word, which is not listed as an option,
  but is in fact how the system behaves.
  The Setting function recognises these values and not WM_BUTTON1CLICK nor
  WM_BUTTON2CLICK, so I assume the IBM documentation is wrong (again!).

  Querying <WP_MOUSE> DragObjectButton returns 65535 in the high word. This
  appears to be put there by the WPS, but setting it to 0 as per the
  documentation seems to have no ill effects.


WARP 4 SPECIFIC

The <WP_SYSTEM> Animation setting which didn't work under Warp 3/FP 37 does
work under Warp 4.

Additional definitions for <WP_SYSTEM>

  MENUBAR_OFF                0
  MENUBAR_ON                 1
  MENUBAR_DEFAULT            2
  MENUS_OFF                  0
  MENUS_ON                   1
  MENUS_DEFAULT              2

Additional settings for <WP_SYSTEM>

  Ŀ
  FolderMenuBar              MENUBAR_ON             Displays folder     
                                                    menu bars.          
  Ĵ
                             MENUBAR_OFF            Does not display    
                                                    folder menu bars.   
  Ĵ
                             MENUBAR_DEFAULT        Sets the default    
                                                    folder menu bar     
                                                    setting.            
  Ĵ
  FolderMenus                MENUS_ON               Displays full       
                                                    folder menu options.
  Ĵ
                             MENUS_OFF              Displays restricted 
                                                    folder menu options.
  Ĵ
                             MENUS_DEFAULT          Sets the default    
                                                    folder menu options 
                                                    setting.            
  


HISTORY

Version 1.2 3-6-00
  Documentation settings update for Warp 4.

Version 1.1  1-3-99
  Added the ability to query settings.
  Added anomalies section.
  Documentation settings update.

Version 1.0  15-2-99
  Initial release.


OTHER

This program was initially developed under Warp 3 (without Win-OS/2) and is
now developed under Warp 4 using VisualAge C++ 3.0 for OS/2.

If you use this program could you please let me know. Also if you have any
comments, criticisms, bug reports or anything that could be improved.
I will reply to all messages received.

Paul Ratcliffe:	Internet: sysset@orac.clara.co.uk
		Internet: paul.ratcliffe@bbc.co.uk
