@database Selector
@$VER: 5.4
@author "Anders Persson"
@index ci






@remark     Hey Hacker! Jesus Loves You!

@remark   This is true! Jesus Really Loves You!
@remark    He gave his life for You, so that you can live if you
@remark     choose to except him.
@remark    Let Him come into your life! He knows you best of everyone.
@remark   He knows what's best for you. But hurry! Before you know,
@remark  your life is over, and it's all too late.
@remark                                              Time is short.

@remark     Jesus is the Way, the Truth and the Life!




























@node "Main" "Selector"

 @{b}@{fg shine}@{bg shadow}Selector 5.4 Guide@{ub}@{fg text}@{bg back}

   @{"Introduction               " link "intro" 0}   The
   @{"Copyrights                 " link "cr" 0}   beginning...
   @{"Installation               " link "inst" 0}
   @{"Beginners course           " link "start" 0}

     @{"Concepts                   " link "Concepts" 0}   Command
     @{"Panel defining commands    " link "panel" 0}   Reference
     @{"Window Commands            " link "Window" 0}   Part...
     @{"Startup commands           " link "Startup" 0} 
     @{"The OnExit command         " link "onexit" 0}
     @{"The OnChange command       " link "onchange" 0}
     @{"Command Index              " link "ci" 0}

       @{"Getting input              " link "input" 0}   Miscellaneous
       @{"Keys                       " link "keys" 0}
       @{"SEL: Searchpath            " link "sel" 0}
       @{"Making Resident            " link "res" 0}

         @{"Env variables              " link "env" 0}   A little more
         @{"Arguments & Other variables" link "other" 0}   advanced
         @{"Selector in shell scripts  " link "shell" 0}   programming
         @{"More tips & trix           " link "tips" 0}
         @{"All examples with source   " system "run >nil: execute allexamples"}
         @{"Bonus Tools                " link "tools" 0}

           @{"Version History            " link "vers" 0}
           @{"Selector Name Conflict     " link "name" 0}
           @{"The End                    " link "slut" 0}   Bye!

             @{"Search document            " system "SearchGuide guide selector.guide"}   (Only if you have SearchGuide installed)

@endnode

@node "Concepts" "Concepts"

@{b}@{fg shine} Concepts:@{ub}@{fg text}
 -------------------------------------------------------------------------

 The Selector window is defined by a source file. This file is loaded by
 the shell command: @{fg shine}Selector "Source file"@{fg text}

 The source file is defined by commands in three different categories:

 1. @{"Startup commands" link "Startup" 0}
 These commands executes every time the file is loaded or the window is
 updated by the update command.

 2. @{"Window commands:" link "Window" 0}
 These commands specifies the windows apperance. They can only be specified
 once in the same sourcefile.

 3. @{"Panel defining commands:" link "panel" 0}
 These command specifies the contetns of the panel, with buttons,
 text strings etc.

 -------------------------------------------------------------------------

 @{fg shine}More about commands:@{fg text}

 Many of the commands have default values.
 You don't have to use any startup or window commands if you don't
 need them. A window is allways opened automatic anyway.

 You can only have one command on each line. You might think that it
 looks like there is many commands on the same line when you take a
 look at the Exec or Button commands. For example the exec command:
 It is in fact one command that can execute many external (AmigaDos)
 commands. And these must be written on one line.

 -------------------------------------------------------------------------

@{fg shine} ITEMS:@{fg text}
 The selector panel is built of items. These can be buttons,
 textstrings or spaces.

 -------------------------------------------------------------------------

@{fg shine} STRING SYNTAX:@{fg text}
 A string can either contain no spaces, or it can be enclosed by
 one of the following signs:
 
    "  '  @  #  £  ^  &
 
 If you for example use the "-sign to enclose the string, then you can't
 use any "-signs inside the string, but you can use any other of the
 signs in the list above in the string.


 Examples:                        Gives the text:

 A_String                          = A_String

 "Isn't it good?"                  = Isn't it good?

 'That is "cool"'                  = That is "cool"
 
 ^Now using both " and '-signs!^   = Now using both " and '-signs!
 
 "Hello, are you "cool" today?"    = Not alowed. Selector will believe this
                                     is three strings:
                                                        Hello, are you 
                                                        cool"
                                                        today?"

 There is no real difference between a <string> and a <number>.
 All are in fact strings.

 -------------------------------------------------------------------------

@{fg shine} COMMENTS:@{fg text}
 You can write comments in your source by setting a ; before it.
 ; A comment...
@endnode

@node "Window" "Window"

 @{b}@{fg shine}Window commands:@{ub}@{fg text}
 ----------------
 These commands specifies the windows apperance. They can only be specified
 once in the same sourcefile.

 -------------------------------------------------------------------------
 @{"Background" link "Background" 0}
 @{"Border" link "border" 0}
 @{"Close" link "Close" 0}
 @{"Darkcolor" link "darkcolor" 0}
 @{"Font" link "Font" 0}
 @{"Gap" link "gap" 0}
 @{"LightColor" link "LightColor" 0}
 @{"Palette" link "palette" 0}
 @{"Rows" link "rows" 0}
 @{"Screen" link "screen" 0}
 @{"Size" link "size" 0}
 @{"Title" link "Title" 0} 
 @{"X" link "X" 0}
 @{"Y" link "x" 100}
 -------------------------------------------------------------------------

 See also: @{"Startup-commands" link "Startup" 0}
           @{"Panel defining commands" link "panel" 0}
           @{"Concepts" link "Concepts" 0}
@endnode

@node "Title" "Title"
 -------------------------------------------------------------------------

@{fg shine} TITLE@{fg text} <string> | OFF
 Sets the window title to "string" or turns it off (the whole dragbar)

 Default is the name of the file.

 -------------------------------------------------------------------------
@endnode

@node "Close" "Close"
 -------------------------------------------------------------------------

@{fg shine} CLOSE@{fg text}  ON | OFF
 Specifies if there will be any close gadget on the window. If you
 have turned of the title bar, then this command will have no effect.

 Default is ON

 -------------------------------------------------------------------------
@endnode

@node "X" "X"
 -------------------------------------------------------------------------

@{fg shine} X@{fg text} <number> [percent|fromMax|fromPointer] | auto | atPointer
 Sets the x position of the window. Examples:
 
 x 120             ;Sets the x position to 120.
 
 x 50 percent      ;Sets the x position so that the window will be placed
                    in the middle of the screen in x-led.

 x auto            ;Same as the last one.
 
 x 100 percent     ;Sets the x position so that the window will be placed
                    as much to the right it can be.

 x 0 frommax       ;Same as the last one.
 
 x 3 frommax       ;Sets the x pos, so that the gap between the right
                    border of the screen and the right border of the
                    window is 3 pixels.

 x atPointer       ;Sets the x pos, so that the mouse pointer points at
                    the middle of the window (in x-led).

 x 0 fromPointer   ;Same as the last one.
 
 x 30 fromPointer  ;Sets the x pos 30 pixels to the right of the pointer.
                    (Calculated from the middle of the window)

 x -30 fromPointer ;Sets the x pos 30 pixels to the left of the pointer.
                     

 Default is auto

 -------------------------------------------------------------------------

@{fg shine} Y@{fg text} <number> [percent|fromMax|fromPointer] | auto | atPointer
 Works in the same way as the @{"X-command." link "X" 0}

 -------------------------------------------------------------------------
@endnode

@node "Background" "background"
 -------------------------------------------------------------------------

@{fg shine} BACKGROUND@{fg text} <number>
 Sets the background color to <number>. Instead of <number> you can use
 "dark" or "light" for the colors set by "lightcolor" and "darkcolor".

 Default is 0

 -------------------------------------------------------------------------
@endnode

@node "LightColor" "LightColor"
 -------------------------------------------------------------------------

@{fg shine} LIGHTCOLOR@{fg text} <number>
 Sets the color of the buttons light colored lines
 (for the 3d effect) to <number>.

 Default is 2

 -------------------------------------------------------------------------
@endnode
 
@node "darkcolor" "darkcolor"
 -------------------------------------------------------------------------

@{fg shine} DARKCOLOR@{fg text} <number>
 Sets the color of the buttons dark colored lines
 (for the 3d effect) to <number>.

 Default is 1

 -------------------------------------------------------------------------
@endnode

@node "gap" "gap"
 -------------------------------------------------------------------------

@{fg shine} GAP@{fg text} <number>
 Sets the gap (space) between two items. So if you set Gap to 0,
 there will be no space between the items. If you set it to 2,
 there will be a space of two pixels between every button (item).
 Note that the lines set by @{"startbox and endbox" link "startbox" 0} only will be seen if
 you have a gap of 2 or more. Also see @{"Gap Demo." system "run >nil: selector gap.sel"}

 Default is 2

 -------------------------------------------------------------------------
@endnode

@node "size" "size"
 -------------------------------------------------------------------------

@{fg shine} SIZE@{fg text} <number> | auto
 Sets the width of the buttons and text (in characters) to <number>.
 If set to auto, then the size will be set according to the longest
 button name (or text field) specified in the file.

 Default is auto

 -------------------------------------------------------------------------
@endnode

@node "rows" "rows"
 -------------------------------------------------------------------------

@{fg shine} ROWS@{fg text} <number> | auto
 Specifies how many rows the items will be placed in. If you for example
 set rows to 3, then the first 3 items will be placed under each other.
 The 4:th item will be placed in right of item 1. The 5:th in right of
 item 2 etc. Please try out the @{"Rows demo" system "run >nil: selector rows.sel"} supplied and you will understand.

 If you have set rows to a value so low that all items not will fit on
 screen because the panel is going to be to whide. Then the number of
 rows is increased so that everything will fit on the screen. This is
 also the case if you specify a value to high.

 If you set rows to auto, then it will be set so that the window will
 be used optimaly and with as few columns as possible.

 Default is auto

 -------------------------------------------------------------------------
@endnode

@node "border" "border"
 -------------------------------------------------------------------------

  @{fg shine}BORDER@{fg text} ON | OFF    (Or @{fg shine}NOBORDER@{fg text})
  This specifies if the window will have a border or not. This can be
  usefull if you for example want to make it look like there are buttons
  directly on the workbench.
  
  Default is ON.

 -------------------------------------------------------------------------
@endnode

@node "screen" "screen"
 -------------------------------------------------------------------------

@{fg shine} SCREEN@{fg text} <PubScreenName> [OrDefault] | Default
 or @{fg shine} SCREEN@{fg text} <width> <hegth> <planes> <mode>

 'SCREEN PubScreenName' will open the window on the public screen with
 the name 'PubScreenName'. For example: 'SCREEN Workbench' for the
 workbench screen. Please note that this name is case sensitive.
 
 'SCREEN default' uses the default public screen. This is often
 the workbench screen.
 
 'SCREEN Name OrDefault' uses the screen 'Name' if it is available,
 else the default screen is used.
 
 'SCREEN <width> <hegth> <planes> <mode>'
 This will open a screen with the specifications above. Mode 1 for lores,
 2 for medres, 3 for interlace, 4 for hires interlace and 5 for common. 
 The screen opened is NOT a public screen.
 
 @{i}Note:@{ui} The screen will be opened/locked only once. This means that you
 can not change the screen parameters with the update command. This is the
 same for both public screens and opened screens.
 
 Default is: 'SCREEN default'

 -------------------------------------------------------------------------
@endnode

@node "palette" "palette"
 -------------------------------------------------------------------------

@{fg shine} PALETTE@{fg text} <colornumber> <% red> <% green> <% blue>
 Sets the palette for colornumber. You MUST open a @{"screen" link "screen" 0} before you
 can change any palette.
 
 Here follows a demo of the SCREEN, PALETTE commands:
 
         screen 320 255 3 1
         palette 0 .4 .3 .5
         palette 1 .4 .3 .5
         palette 2 .1 0 .4
         palette 3 .6 .7 1
         palette 4 .5 .6 .8
         palette 5 .6 .5 .7
         palette 6 .7 .4 .6
         palette 7 .8 .3 .5
         
         darkcolor 2
         lightcolor 3
         
         noborder
         title off
         
         gap 6
         color light
         text "Super Neon Crackers"
         text "Proudly Presents:"
         space
         
         startbox
         color dark 4
         button "Snus Maze" 'run >nil: coolgame1' exit
         color dark 5
         button "Second Game" 'run >nil: coolgame2' exit
         color dark 6
         button "Oh, nomore supermasken" 'run >nil: coolgame3' exit
         color dark 7
         button "Bumper" 'run >nil: coolgame4' exit
         endbox
         space
         color light
         text "NeonBBS (+46)31-1234567"
         
         @{"Try it!" system "run >nil: selector gamedisk.sel"}

 -------------------------------------------------------------------------
@endnode
@node "Font" "Font"
 -------------------------------------------------------------------------

 @{fg shine}FONT@{fg text} <fontname> <size>
 
 Sets the font for the window.
 Ex:
      Font topaz 9
 
 Instead of name or size, you can write "default" for the default font.
 Ex:
      Font default 18
      
 You can set selectors default font by starting the program @{"SelectorFont" system "run >nil: /selectorfont setdefault"}
 from workbench, or from shell with the keyword "setdefault".
 
 SelectorFont can also be used to request a font from the user, ex:
 
    defenv myfont "default"
    font [myfont]
    
    text "Current font:"
    text "[myfont]"
    button "Change it!" 'setenv myfont `SelectorFont [myfont]`' update
    
    unsetenv myfont
    
 @{"Try it!" system "run >nil: selector font.sel"}

 -------------------------------------------------------------------------
@endnode

@node "Startup" "Startup"

@{b}@{fg shine} Startup commands:@{ub}@{fg text}
 -----------------
 These commands executes every time the file is loaded or the window is
 updated by the update command.

 -------------------------------------------------------------------------
 @{"Defarg" link "defarg" 0}
 @{"Defenv" link "defenv" 0}
 @{"Exec" link "Exec" 0}
 @{"Setenv" link "setenv" 0}
 @{"Unsetenv" link "unsetenv" 0}
 @{"Version" link "version" 0}
 -------------------------------------------------------------------------

 See also: @{"Window commands" link "Window" 0}
           @{"Panel defining commands" link "panel" 0}
           @{"Concepts" link "Concepts" 0}
@endnode

@node "Exec" "Exec"
 -------------------------------------------------------------------------
 
@{fg shine} EXEC@{fg text} 'command 1' ['command 2'] ['command 3'] .... etc.
 Executes external commands as if you would write them into a shell
 window. Note the use of the '-signs. This is made so you can use
 "-signs in your command lines. Every command line is stated within
 two '-signs. Like this:
 Exec 'list >"ram:A file"' 'type "ram:A file"'
 It is however possible to use the "-signs instead of the '-signs if
 you not are going to use any "-signs in your command. Like this:
 Exec "list ram:" is equvivalent to Exec 'list ram:'.
 But Exec 'list "ram disk:"' is not equal to Exec "list "ram disk:""
 where selector will believe that you want to execute the command
 "list " and then the command ram etc. Read more about string syntax
 under @{"Concepts." link "Concepts" 42}

 -------------------------------------------------------------------------
@endnode
@node "setenv" "setenv"
 -------------------------------------------------------------------------
 
@{fg shine} SETENV@{fg text} variable "value"
 Sets the env variable <variable> to "value". You can also accomplich
 this with the external command setenv. Like this:
 exec 'setenv variable "value"'

 -------------------------------------------------------------------------
@endnode
@node "defenv" "defenv"
 -------------------------------------------------------------------------

@{fg shine} DEFENV@{fg text} variable "value"
 Sets the env variable <variable> to "value", but only if the variable
 not previosly is set. This way you can specify default values on env
 variables.

 -------------------------------------------------------------------------
@endnode

@node "defarg" "defarg"
 -------------------------------------------------------------------------

 @{fg shine}DEFARG@{fg text} argument "value"
 (Where argument is arg1....arg9)
 Sets the argument to "value" if the argument not was passed from the
 command line or button..load command. Please see the @{"defarg example" link "other" 32}
 under @{"Arguments & Other variables." link "other" 0}

 -------------------------------------------------------------------------
@endnode
@node "unsetenv" "unsetenv"
 -------------------------------------------------------------------------

@{fg shine} UNSETENV@{fg text} variable
 Deletes the env variable <variable>. Please see the @{"unsetenv technique" link "tips" 66}
 example.

 -------------------------------------------------------------------------
@endnode
@node "version" "version"
 -------------------------------------------------------------------------

 @{fg shine}VERSION@{fg text} <number>
 This command tests selectors version number. Example:
 
    Version 4.3
 
 If selectors version number is lower than 4.3, selector will end and say
 that "This script needs Selector 4.3"

 -------------------------------------------------------------------------
@endnode

@node "panel" "panel"

 @{b}@{fg shine}Panel defining commands:@{ub}@{fg text}
 ------------------------
 These command specifies the contetns of the panel, with buttons,
 text strings etc.

 -------------------------------------------------------------------------
 @{"Button" link "button" 0}
 @{"Center" link "center" 0}
 @{"Color" link "color" 0}
 @{"Endbox" link "startbox" 0}
 @{"Space" link "space" 0}
 @{"Startbox" link "startbox" 0}
 @{"Text" link "text" 0}
 -------------------------------------------------------------------------

 See also: @{"Window commands" link "Window" 0}
           @{"Startup-commands" link "Startup" 0}
           @{"concepts" link "Concepts" 0}
@endnode




@node "button" "button"
 -------------------------------------------------------------------------

@{fg shine} BUTTON@{fg text} 'Button Name' ['command 1' 'command 2' ... 'command n']
            [@{fg shine} UPDATE@{fg text} | @{fg shine}LOAD@{fg text} <file> [arguments] | @{fg shine}EXIT@{fg text} [<string>]
            | @{fg shine}QUIT@{fg text} [<string>]] | @{fg shine}DumpX@{fg text} <variable> | @{fg shine}DumpY@{fg text} <variable> ]

 This is selectors most important command. It spesifies the button name
 and what actions that will happen if the button is pressed. The command
 part (['command 1' .... 'command n']) has exactly the same syntax as the
 exec command. So read about the @{"exec command" link "exec" 0} for more details. But
 with the button command, you can leave the command part out if you want.
 You can for example make a button that does nothing at all:
 Button "Nothing".

 The@{i} @{ui}@{fg shine}EXIT@{fg text} option simply ends the program. You can use the @{i}@{fg shadow}EXIT@{ui}@{fg text} <string>
 command to write out a result to the shell window before quitting. If you
 have used the @{"OnExit" link "onexit" 0} command, this will be executed before ending.
 
 The @{i} @{ui}@{fg shine}QUIT@{fg text} option works in the same way as the
 EXIT option except that the @{"OnExit" link "onexit" 0} command (if used) not will be executed
 before quitting.

 The @{fg shine}UPDATE@{fg text} option reloads the source file and updates the panel. This
 is usefull if you make use of @{"env variables." link "env" 0} If selector was loaded
 with arguments, these will remain the same. If the window parameters
 (size, title etc.) not are changed, then the window don't have to be
 closed and opened again, and this speeds things upp a lot. It also
 prevents you from "jumping" to the workbench every time the window
 is updated. So if you like a fast update, then make sure that the
 window size is the same. You can do this with the @{"size command." link "size" 0}
 @{b}NOTE:@{ub} The X and Y parameters will be ignored on an update. The new window
 will remain in the same position on the screen. If you want X and Y not
 to be ignored, please use the @{i}LOAD [this]@{ui} option instead.

 The @{fg shine}LOAD@{fg text} <filename> [arguments] option is similar to the @{i}UPDATE@{ui} option.
 But @{i}LOAD@{ui} loads the source <filename> and rebuildes the panel after
 that file. The possibility of @{"passing aguments" link "other" 11} with the load command was
 introduced in Selector 4.1

 The @{fg shine}DumpX@{fg text} <variable> option saves the current X position of the window
 to the env variable specified. This is useful if used from the @{"OnExit" link "onexit" 0}
 command for saving a default start position for the window.
 
 The @{fg shine}DumpY@{fg text} <variable> option works in the same way as DumpX.


 @{fg shine}Here is some examles of buttons:@{fg text}

 Button Help 'run >nil: multiview help.doc'
  @{i}This one loads multiview with the file help.doc if the button
  Help is pressed.@{ui}

 Button Exit exit
  @{i}Selector is terminated when the button is pressed@{ui}

 Button Exit exit "Selector is ending"
 @{i} Selector writes the string to the shell window before quitting
  (when the button is pressed).@{ui}

 Button "Another Exit" 'delete t:temp' exit
  @{i}The file t:temp is deleted before ending@{ui}

 button Reload 'setenv cool Yes' update
 @{i} This one sets the env variable cool to Yes and then reloads the
  source and rewrites the window.@{ui}

 button Update Update
  @{i}is (almost) eqvivalent to@{ui}
 button Update Load [this]
  @{i}or@{ui}
 button Update 'run >nil selector [this]' exit
  @{i}(if you have selector in the path.)@{ui}

 Button "View Source" "type [this]"
 @{i} Types the source file

@{ui} Button Other Load Other.sel "One" Two '"Three"'@{i}
  Loads selector with the source Other.sel and passes the arguments
  One, Two and "Three"

@{ui} @{"[this] is the name of the source." link "other" 0}

 -------------------------------------------------------------------------
@endnode
@node "text" "text"
 -------------------------------------------------------------------------

@{fg shine} TEXT@{fg text} <string>
 Writes the text <string> as an item in the panel. Example:
 Text "This is written"
 Text "in the panel."

 -------------------------------------------------------------------------
@endnode
@node "space" "space"
 -------------------------------------------------------------------------

@{fg shine} SPACE@{fg text}
 Inerts a half space (half the heght of an item). But it is
 counted as one item.

 -------------------------------------------------------------------------
@endnode
@node "color" "color"
 -------------------------------------------------------------------------

@{fg shine} COLOR@{fg text} <foreground> [background]     (or @{fg shine}foreground@{fg text} <color>)
 Sets the color of the following buttons and text. Example:
 color 1
 text "This is written in color 1"
 color 2 1
 text "This is written in color 2 on a background of color 1"
 
 Instead of color numbers, you can use "light" and "dark" for the
 colors set by the @{"darkcolor" link "darkcolor" 0} and @{"lightcolor" link "lightcolor" 0} commands. Example:
 
 color light
 color 3 dark

 -------------------------------------------------------------------------
@endnode
@node "center" "center"
 -------------------------------------------------------------------------

@{fg shine} CENTER@{fg text} ON | OFF
 Specifies if the folowing text and buttons text is going to be
 centered or not. If it is turned off, the text will be left justified.
 Default is ON

 -------------------------------------------------------------------------
@endnode
@node "startbox" "startbox"
 -------------------------------------------------------------------------

@{fg shine} STARTBOX@{fg text} and @{fg shine}ENDBOX@{fg text}
 Specifies a inverted 3D box in the panel. Example:
 Startbox
   text "This text and the next button"
   button "will be within a box"
 endbox

@{i} Note 1:@{ui} You must have a GAP @{"(se the gap command)" link "gap" 0} of 2 or more for the
 box to be seen.

@{i} Note 2:@{ui} If you make use if the @{"ROWS" link "rows" 0} command, it is possible for a
 box to begin on one column and end on another. Then this will look
 like there is two boxes. But the line between them is so thin, that
 it looks like the items are grouped together anyway.

@{i} Note 3:@{ui} The boxes can not be nested.

 -------------------------------------------------------------------------
@endnode

@node "env" "env"

 @{b}@{fg shine}Env variables:@{ub}@{fg text}
 --------------
 It is possible to make use of env variables anywhere in the source.
 They are stated with []-signs around them. So if you have an env
 variable with the name color ($color) then you should write [color]
 in the selector source. Here is a little example:

        Defenv g 6
        gap [g]

        text "The gap is now: [g]"
        button "No Gap" 'setenv g 0' update
        button exit 'unsetenv g' exit

 @{"Try it!" system "run >nil: selector env1.sel"}

 -------------------------------------------------------------------------

 @{fg shine}How the variables works.@{fg text}

 When the source is loaded (or updated) this is what happens:

 1 The next line is loaded.

 2 It is seached for any [variables], and they are replaced by the contents
   of the real env variables (if there is one). The contents of the env
   variable is actually copied into the text line. So the only time you
   can change any variables in a selector source is when it is loaded
   or updated. You can of course change the real env variables, and then
   update selector. This is what is done in the above example.

 3 After this, the line is analyzed, and if it is a window command or
   startup command, it is executed. If it's an OnChange command, the
   contents of the variable to be watched is remembered at this point.

 4 When all lines has been gone though, then the window is calculated
   and opened. Then the whole source is gone through again, and the
   Panel defining commands are analyzed.

 This is why you must have the defenv command before the gap [g] command
 in the the example above.

 The Defenv command sets the env variable g to 6 if the variable g not
 allready exists. So 6 is the default value for g.

 -------------------------------------------------------------------------

 @{fg shine}Replacable commands:@{fg text}

 Using env variables, you can not only have variable strings and numbers,
 but you can change the whole funcionality of the panel by using variable
 commands. Try this:

    close off
    defenv item "button 'Remove button' 'setenv item Text Nothing' update"
    [item]
    button exit 'unsetenv item' exit

 @{"Try it!" system "run >nil: selector env2.sel"}

 Here the command [item] is defined to be a button that replaces itself
 with the text string 'Nothing'

 -------------------------------------------------------------------------

 You can also use env variables to switch some commands off with the
 comment sign (;), like this:

        close off
        defenv c ";"
        gap 4
        rows 3

        startbox
        [c] text "Just press"
        [c] text "the different"
        [c] text "buttons"
        endbox
        button "Help text" 'setenv c " "' update
        button "No Help" 'setenv c ";"' update
        button exit 'unsetenv c' exit

 @{"Try it!" system "run >nil: selector env3.sel"}

 -------------------------------------------------------------------------

 @{fg shine}Getting user input to an env variable.@{fg text}

 For this, you must use the AmigaDos echo
 command and open a new con window:

 close off
 defenv Me "Boray"
 button '[Me]' 'echo >nil: <CON:30/100/400/40/Your_Name to env:Me ?' update
 button exit 'unsetenv Me' exit

 @{"Try it!" system "run >nil: selector env4.sel"}
 
 -------------------------------------------------------------------------

@{fg shine} Requeststring@{fg text}
 
 Another and a much better way to get user input is to use the external
 command Requeststring that also is included in this package. (In the
 Tools drawer). This command is made by Adam Dawes and is freeware.
 @{"(Requeststring.txt)" link "/tools/requeststring.txt/main" 0}
 Here is the above example using requeststring instead of echo and CON:
 
        close off
        defenv Me "Boray"
        button '[Me]' 'requeststring >env:Me body "Enter Your Name"
                       title Request default "[me]"' update
        button exit 'unsetenv Me' exit

 @{"Try It!" system "run >nil: selector env6.sel"}
 
 (Please note that the line beginning with "button '[Me]' and the following
 line are supposed to be on the same line.)
 
 -------------------------------------------------------------------------

 @{fg shine}In source, but not in env:@{fg text}

 If you have an env variable in your source, and that variable doesn't
 exists, then the name of the variable will be used.

 Example:

    setenv variable1 "This variable exists!"

    text '[variable1]'
    text '[variable2]' ;This doesn't...

 @{"Try it!" system "run >nil: selector env5"}

 -------------------------------------------------------------------------

 Also see @{"Other variables" link "other" 0} and @{"shell scripts." link "shell" 0}
@endnode

@node "other" "other"

@{fg shine} Other variables:@{fg text}
 -------------------------------------------------------------------------

 @{fg shine}Current source name@{fg text}

 [THIS] is the current loaded source file. It is no real env variable.
 You can see it as a local variable for each running selector.

 -------------------------------------------------------------------------

 @{fg shine}Arguments@{fg text}

 [arg1] [arg2] .... [arg9] is the optional arguments passed to
 selector from the command line. (Selector <source> [<arg1> ... <arg9>])
 Or with the @{"Button..load" link "button" 0} command:
 (button ButtName load <source> [<arg1> ... <arg9>])

 When you pass arguments to Selector, they are treated as normal
 Selector strings, for example:

 A source called arg.sel:

   text '[arg1]'
   text '[arg2]'
   text '[arg3]'

 @{"Run it like this:" system "execute arg"}

 Selector arg.sel 'This is arg 1' "This is arg 2" 'This is "arg 3"'


 @{fg shine}Default arguments@{fg text}

 You can use the @{"DefArg" link "defarg" 0} command to specify a default
 value for an arg variable. This default value will be used if the
 argument wasn't passed from the command line (or button..load command):

 Example: (source called "argtest.sel")

    defarg arg1 "First arg not given"
    defarg arg2 "Second arg not given"
    text '[arg1]'
    text '[arg2]'

 Try it like this:

    1 @{"selector argtest.sel Passing arguments" system "run >nil: selector argtest.sel Passing arguments"}
    2 @{"selector argtest.sel" system "run >nil: selector argtest.sel"}
    3 @{"selector argtest.sel * *" system "run >nil: selector argtest.sel * *"}
    4 @{"selector argtest.sel * 'Only second arg given'" system "run >nil: selector argtest.sel * 'Only second arg given'"}
    5 @{"selector argtest.sel 'Only first arg given' *" system "run >nil: selector argtest.sel 'Only first arg given' *"}
    6 @{"selector argtest.sel 'Here to'" system "run >nil: selector argtest.sel 'Here to'"}

 As you can see, passing "*" will give the default string. You must use
 the "*" if you only want to pass the second argument (like in
 case 4 above).

 -------------------------------------------------------------------------

 @{fg shine}About arguments without default value@{fg text}

 If you don't have a default value for an argument that not is passed, then
 the name of the argument will be used.

 Example: (source called "argtest2.sel")

    text '[arg1]'
    text '[arg2]'

 Try it like this:

    @{"selector argtest2 Hello!" system "selector argtest2 Hello!"}

 -------------------------------------------------------------------------

 Also see the use of selector in @{"shell scripts." link "shell" 0}
@endnode

@node "shell" "shell"

 @{fg shine}Selector in shell scripts@{fg text}
 -------------------------
 Selector can be used as a powerful tool within shell scripts.
 This thanks to:

    @{fg shine}*@{fg text} The possibility of using env variables within selector source files.

    @{fg shine}*@{fg text} The possibility of passing variables to selector from the
      command line.

    @{fg shine}*@{fg text} The possibility of passing a return string (or variable) from
      a selector script (with the button option exit <string>).

    @{fg shine}*@{fg text} The possibility of making selector sources with the AmigaDos
      command List LFORMAT.

 -------------------------------------------------------------------------

 @{fg shine}General requester@{fg text}

 It is sometimes a good idea to have a little requester to use in
 shell scripts.

 Here is a selector source called req.sel:

        gap 6
        rows 2
        title "Request:"

        space
        color 2
        text "[arg1]"

        color 1
        startbox
          button Yes exit Yes
        endbox

        button No exit No


 (The @{"[arg1]" link "other" 10} variable is the first argument given to selector)

 Here is a shell script that uses req.sel:

        if `selector req.sel "Really delete?"` eq Yes
          delete "file"
        endif

 @{"Try them together!" system "execute testscript"}

 -------------------------------------------------------------------------

 @{fg shine}Confirmation tool@{fg text}

 In the example above we used a general requester to confirm if a
 command was to be executed or not. This spesific problem can be solved
 in a much better way: Pass the command to selector, and let selector
 execute it if you press Yes.


    gap 6
    close off
    title 'Please Confirm'
    rows 2

    color 2
    text "Okay to:"
    text '[arg1]'

    color 1
    startbox
      button Yes '[arg1]' exit
    endbox
    button No Exit

@{i} Use it like this:@{ui}

   Selector confirm.sel 'delete "ram:the file"'

 @{i}If you press Yes, the command given by [arg1] is executed.@{ui}

 @{"Try it!" system "execute confirm"}

 -------------------------------------------------------------------------

 @{fg shine}List LFORMAT@{fg text}

 The use of the List LFORMAT command and Selector gives a powerful
 combination as seen in the folowing shell script:

.key dir

 ECHO >ram:panel "title '<dir>'"
 LIST >>ram:panel <dir> files pat ~(#?.info) LFORMAT "button '%n' 'run >nil:
*"%f%n*"'"
 RUN >nil: SELECTOR ram:panel

 @{"Try it!" system "execute lformat sys:utilities"} (The script is executed with the argument "sys:utilities")

 -------------------------------------------------------------------------

 @{fg shine}TinyMess@{fg text}
 
 Using the @{"OnChange command" link "onchange" 0} and the same principle used in the
 @{"clock example," link "onchange" 77} we can make a little message window that is shown for
 two seconds. We can than use this from a shell script:
 
        title off
        text "[arg1]"

        setenv tinymess "[arg1]"
        onchange tinymess exit
        unsetenv tinymess

 @{"Try it:" system "run >nil: selector tinymess 'Please wait!' "}
 run >nil: selector tinymess 'Please wait!'

 -------------------------------------------------------------------------
 
 See also: @{"SEL:" link "sel" 0} and @{"More trix & tips" link "tips" 0}
@endnode

@node "keys" "keys"

@{fg shine} Keys:@{fg text}
 -----
 You are able to exit anytime by pressing ESC....
 You can also press the keys 1..to 9.. for pressing the first
 nine buttons. If you press return, then the last button pressed
 will be pressed once more.
@endnode

@node "intro" "intro"

  @{fg shine}Introduction@{fg text}

  Selector was from the begining just a program shipped with the
  blanker "WakeUpII". It was ment to serve as a launching tool for
  the different programs included in that package. But it has grown
  to a highly configurable launching tool for almost any purpose. But
  it is not yet another program like toolsdeamon or launchingpad.
  Selector serves as a complement to these types of programs.

  It's strenght lies in what it once was design to do. To be a
  launching tool for a group of software.

  Selector is a powreful tool to use within shell scripts or to
  make a little GUI for your CLI type program. I have for example
  made a GUI for GMPlay (gmplay_gui13.lha on Aminet) using selector.
  
  It is really easy to produce a button panel, info window  or a little
  requester with selector.

   @{"-This I wan't to see!" link "start" 0}

 -------------------------------------------------------------------------
@endnode

@node "start" "start"

 @{fg shine}Beginners cource@{fg text}

 Now let's see how easy Selector is to program. If there is a command
 that you don't understand, look in the @{"command index." link "ci" 0}

 -------------------------------------------------------------------------

 We will begin with a little info window:

   text "This is a little info"
   text "window made with"
   text "Selector 4.0"
   space
   text "Close window to continue"

 The script above is written to a file called "b1.sel"
 Then it is run with:   Selector b1.sel

 @{"Try it!" system "run >nil: selector b1.sel"}

 @{i}-Now, wasn't that easy?@{ui}

 -------------------------------------------------------------------------

 Now we will try to make a little button panel instead:

   button "The clock" 'run >nil: sys:utilities/clock'
   button "Startup" 'type >con: s:startup-sequence'
   button exit exit

 @{"Try it!" system "run >nil: selector b2.sel"}

 -------------------------------------------------------------------------

 Now, how about a little requester?

   close off
   gap 6
   rows 2

   color 2
   text "Leave from this"
   text "requester now?"

   color 1
   startbox
     button Yes Exit
   endbox
   button No

 @{"Try it!" system "run >nil: selector b3.sel"}

 -------------------------------------------------------------------------

 It is possible to execute several external AmigaDos commands on the same
 button. In the folowing example, we make one tiny button that uses the
 AmigaDos command echo to create another selector source called ram:s
 And then it loads it with the button option LOAD.

   title off
   gap 0

   button "Press" 'echo >ram:s "text *"A button that makes*""' 'echo >>ram:s "text *"Another selector script*""' 'echo >>ram:s "text *"and runs it*""' load ram:s

 @{"Try it!" system "run >nil: selector b4.sel"}

 -------------------------------------------------------------------------

 Now I think it's time for you to look at one of the folowing sections:

 @{"Concepts" link "Concepts" 0}
 @{"Panel defining commands" link "panel" 0}
 @{"Window commands" link "Window" 0}
 @{"Startup commands" link "Startup" 0}
@endnode

@node "tips" "tips"

 @{fg shine}Creating a switch button@{fg text}

 You can simplify making a switch button by writing a little shell script:

   .key var,s1,s2

   if $<var> EQ <s1>
          setenv <var> <s2>
   else
          setenv <var> <s1>
   endif

 Name this script "switch", Set the script falg (Protect "switch" +S)
 and use it as shown below:

    close off
    gap 4
    defenv s ON

    button exit 'unsetenv s' exit
    space
    startbox
      text "The switch is:"
      button [s] 'switch s ON OFF' update
    endbox

 @{"Try it!" system "run >nil: selector switch.sel"}

 -------------------------------------------------------------------------

 @{fg shine}More about variables...@{fg text}

 Remember that the env variables in a selector source file only are
 updated when a source is @{"updated or loaded." link "env" 18} So don't try something
 like this:

 button "Load source" "setenv name `requestfile`" load [name]

 The variable [name] is not changed... You can solve the problem
 above like this:

 button "Load source" "run >nil: selector `requestfile`" exit

 -------------------------------------------------------------------------

 @{fg shine}Changable arguments@{fg text}

 Maybe you would like to pass a variable from the command line, that then
 could be altered. This you can do by passing the arg to an env variable:

 Example: (Source called ChArgs.sel)

    defarg arg1 'Nothing passed'
    defenv vary '[arg1]'
    close off

    button '[vary]' 'setenv vary "Button pressed"' update
    button Quit 'unsetenv vary' exit

 Try it like this:

    @{"Selector ChArgs 'Press the button!!'" system "run >nil: Selector ChArgs 'Press the button!!'"}
    @{"Selector ChArgs" system "run >nil: Selector ChArgs"}

 -------------------------------------------------------------------------

 @{fg shine}Unsetenv technique@{fg text}

 If you wan't some variables in an information window without buttons,
 you could wonder how to unset them again. This because there is no exit
 button to unset them on... well, the answer is simple, use the unsetenv
 command at the end of the source:

 Ex: (source called "etips.sel")

    defarg arg1 c:type
    exec 'setenv size `list "[arg1]" lformat "%l"`'

    text 'The size of [arg1]'
    text 'is [size] bytes'

    unsetenv size

 Try it like this:

    @{"selector etips" system "selector etips"}
    @{"selector etips sys:utilities/more" system "selector etips sys:utilities/more"}

 This technique is possible because of @{"the way selector inserts" link "env" 19} the env
 variables into the source, line by line. You can use this technique as
 long as you only use [variables], and no $variables. This because the
 variables only exists when the panel is loaded, and not when a button
 is pressed etc. Then they exist in the source, but not in ENV:

 This technique is in fact preferable over the alternative to unset the
 variables on an exit button. It also makes the env variables occupied for
 a shorter time, which in turn prevents name conflicts. It also in many
 cases let you skip the exit button and "close off" command. The fact that
 I not used this technique in many of the examples, is that I didn't think
 of this possibility until some minutes ago. I also added the unsetenv
 command to speed the technique up (instead of exec 'unsetenv...)

 Example:

 The corresponding source (using this technique) for the
 @{"dissapearing button example" link "env" 46} would be:

    defenv item "button 'Remove button' 'setenv item Text Nothing' update"
    [item]
    unsetenv item

 @{"Try it!" system "run >nil: selector etips2"}

 But, as mentioned, this technique is NOT allways possible to use, for
 example in the @{"switch example." link "tips" 0}

 -------------------------------------------------------------------------

 @{fg shine}Passing variables@{fg text}

 If you want to write, for example a general requester that can be called
 from other selector scripts, you can make this in several different ways.
 I want to show you three different ways to accomplish the same goal.

 In the examples, we want to call a color requester, and set the
 background to this color. Each of the alternatives uses different
 ways of passing variables.

 @{fg shine}1.@{fg text} The simplest way. One that starts a new copy of selector. This
    takes of cource a little more memory, and is a little bit slower
    than the next two alternatives. It is much more slow if you not
    have a hard disk and selector not resident.

    @{i}Calling file:@{ui}
    background [color]
    button "Select color" "setenv color `selector color.sel`" update

    @{i}Called file:@{ui}
    button "Gray" exit 0
    button "Black" exit 1
    button "White" exit 2
    button "Blue" exit 3

 @{fg shine}2.@{fg text} One that loads the other file to this copy of selector, and then
    reloads the old source. For this you must pass the name of the calling
    source to the called file.

    @{i}Calling file:@{ui}
    background [arg1]
    button "Select color" load 'color.sel "[this]"'

    @{i}Called file:@{ui}
    button "Gray" load '"[arg1]" 0'
    button "Black" load '"[arg1]" 1'
    button "White" load '"[arg1]" 2'
    button "Blue" load '"[arg1]" 3'

 @{fg shine}3.@{fg text} Similar to number 2. But here the name of the variable that will
    be set is passed to color.sel, and set in that file.

    @{i}Calling file:@{ui}
    background [color]
    button "Select color" load 'color.sel "[this]" color'

    @{i}Called file:@{ui}
    button "Gray" 'setenv [arg2] 0' load '"[arg1]"'
    button "Black" 'setenv [arg2] 1' load '"[arg1]"'
    button "White" 'setenv [arg2] 2' load '"[arg1]"'
    button "Blue" 'setenv [arg2] 3' load '"[arg1]"'

 -------------------------------------------------------------------------
@endnode

@node "cr" "cr"

  @{fg shine}Copyrights@{fg text}

  Selector is Copyrighted (C) 1997 by Anders Persson, but you can
  distribute it with your freeware software as long as you also include
  the readme file (Selector/Selector54.readme).
  
  You can also include selector with any shareware or commercial
  software, as long as you send me a registred version of your
  product. 

  Here is my address:

  Anders Persson
  Mellangardsv. 9
  S-417 29 Goteborg
  SWEDEN
  
  The fact that Selector is freeware doesn't mean that I don't like gifts,
  like money or perhaps a program that you have made...
@endnode

@node "input" "input"

 @{fg shine}Getting input@{fg text}

 If you like to run a CLI/shell program that must have input from the
 keyboard, then you MUST open a new con: window for both output
 and input. Like this:

 button "Check" 'checkmate <>con:0/11//210/CheckMate/Close [cont] b [base]'

 button "DiskCopy" 'diskcopy <>con:0/11//180/DiskC/Close from df0: to df0:'

 -------------------------------------------------------------------------

 @{fg shine}Filename input@{fg text}

 If you have AmigaDos3.0 or better, you can use the C:requestfile
 command to get a filename. Here is a little example:

   button "Read text" 'multiview `requestfile`'

 @{"Try it!" system "run >nil: selector filename.sel"}

 Please note the difference between the ` and ' signs. The ` sign
 (placed over the tab button) is used in AmigaDos to pass output from
 one command directly into another command. This is how it works:
 Ex:

 list `echo "S:"`

 First the command echo is executed. The output from this command is
   S:
 The text `echo S:` is then replaced by the output from echo (S:)
   list S:
 This command is then executed.

 -------------------------------------------------------------------------

 Also se: @{"How to get user input to an env variable." link "env" 86}
@endnode

@node "res" "res"

 @{fg shine}Making Selector Resident@{fg text}

 Making Selector resident will speed things up, and save memory if you
 have more than one selector running at the same time. If you only have
 one selector running, it makes no difference until you start one more...

 So the only time you not should make it resident is, if you don't
 use selector... very often

 You can make Selector resedent by adding this line to your
 user-startup (or startup-sequence)

 @{fg shine}Resident C:Selector pure@{fg text}

 (If you have Selector in C: of course)
@endnode

@node "sel" "sel"

 @{fg shine}Selectors searchpath@{fg text}

 If you want to load Selector with a source file called "Filename", you
 probably do this by the folowing command:

    Selector "Filename"

 Now, selector starts to look for the file "Filename" in the following
 order:

@{i} 1. "Filename"

 2. "Filename.sel"

 3. "SEL:Filename"

 4. "SEL:Filename.sel"@{ui}

 This way, you can have a directory where you have all your selector
 files (.sel) and then assign SEL: to it. You can then, without bothering
 in what directory you stand, allways reach the files. This works in the
 same way, as the S: directory works for the AmigaDos execute command.

 You should then add something like this to your user-startup:@{fg shine}

 Assign SEL: work:selector@{fg text}

 -------------------------------------------------------------------------
@endnode

@node "why" "why"

  Imagine you have made a software packackage,
  including some programs, for example one for listing all tasks of the
  system, and another for showing which tasks that requires most CPU
  time. And some other programs that has other functions...

  How would this be for the user? Well... He could click himself to
  the drawer containing these programs every time he needed them. But
  when he had done that a couple of times, he would probably put
  some (or all) of the programs in his launching tool. For example
  as a sub-menu in toolsdeamon.

  Let's make it more easy for the user, so that he won't need to include
  all the different programs, one by one, in his launching tool.
  With Selector, you can ship a little nice button panel with
  your software, and the user will only need to add one item to his
  launching tool.
@endnode

@node "ci" "ci"

 @{fg shine}Command index@{fg text}

 @{"Background" link "background" 0}
 @{"Border" link "border" 0}
 @{"Button" link "button" 0}
 @{"Center" link "center" 0}
 @{"Close" link "close" 0}
 @{"Color" link "color" 0}
 @{"Darkcolor" link "darkcolor" 0}
 @{"Defarg" link "defarg" 0}
 @{"Defenv" link "defenv" 0}
 @{"DumpX" link "button" 0}
 @{"DumpY" link "button" 0}
 @{"Endbox" link "startbox" 0}
 @{"Exec" link "exec" 0}
 @{"Exit" link "button" 0}
 @{"Font" link "font" 0}
 @{"Foreground" link "color" 0}
 @{"Gap" link "gap" 0}
 @{"Lightcolor" link "lightcolor" 0}
 @{"Load" link "button" 0}
 @{"NoBorder" link "border" 0}
 @{"OnExit" link "onexit" 0}
 @{"OnChange" link "onchange" 0}
 @{"Palette" link "palette" 0}
 @{"Quit" link "button" 0}
 @{"Rows" link "rows" 0}
 @{"Setenv" link "Setenv" 0}
 @{"Size" link "size" 0}
 @{"Screen" link "screen" 0}
 @{"Space" link "space" 0}
 @{"Startbox" link "startbox" 0}
 @{"Text" link "text" 0}
 @{"Title" link "title" 0}
 @{"Unsetenv" link "unsetenv" 0}
 @{"Update" link "button" 0}
 @{"Version" link "version" 0}
 @{"X" link "x" 0}
 @{"Y" link "x" 100}
@endnode

@node "slut" "slut"

 @{fg shine}The End@{fg text}

 I would very much appreciate if you sent me a mail and told me how
 you are using selector and what you think about it.

 Send an e-mail to:
   di3andpe@ida.his.se
 
 If you don't get any answer, I have probably left scool, so send
 an ordinary mail to this address:

   Anders Persson
   Mellangardsv. 9
   S-417 29 Goteborg
   SWEDEN
 
 If you don't have email, you can of cause use this address right away.
  
 Regards/
 Anders Persson
@endnode

@node "vers" "vers"

 @{fg shadow}@{bg shine}Version History@{fg text}@{bg back}
 -------------------------------------------------------------------------

 @{fg shine}Selector 1.08 (940713)@{fg text}

   -Static button panel for launching the different programs
    in the WakeUpII screenblanker package.


 @{fg shine}Selector 2.06 (940717)@{fg text}

   -The button panel was made configurable, with the commands:
    "Button", "X", "Y", "Size" and "Center"


 @{fg shine}Selector 3.20 (940729)@{fg text}

   -More commands:
    "Title", "Gap", "BackGround", "ForeGround", "LightColor" and "DarkColor"

   -{this} a variable for current source

   -Support programs for making panel design more easy:
    "AddButton 1.03 (940720)", and "NewPanel 1.01 (940721)"


 @{fg shine}Selector 4.0ö1 (960425)@{fg text}

   -More commands:
    "text", "space", "Title off", "Close", "rows", "exec", "setenv",
    "defenv", "color", "startbox", "endbox", "button...uppdate"
    and "buton...load"

   -Panels can now be more than one row of buttons. They can also
    contain text strings and inverted boxes.

   -Env variables support

   -Possible to pass variables from command line ([arg1]...[arg9])

   -Possible to pass return data with the "button...exit" command

   -{this} altered to [this]

   -Selector can not be started from Workbench any longer, this because
    it didn't get the whole search-path when it did. And this would get
    incompatible scripts.

   -The support programs (AddButton and NewPanel) became unmodern and
    was removed.

   -This guide document was written.


 @{fg shine}Selector 4.14 (960529)@{fg text}

   -Bugfix:
    Selector did enter an infinite loop when there was a text
    string or button name that was wider than the screen.

   -Bugfix:
    It wasn't possible to exit by pressing escape when there was
    no buttons in the panel.

   -Bugfix:
    Now possible to use arg0, arga, argb, argc etc. as env variables.

   -Possible to pass arguments with the @{"button...load" link "button" 0} command

   -The @{"DefArg" link "defarg" 0} command was introduced.

   -@{"Unstated arguments" link "other" 60} that not have a default value (given with defarg)
    will now contain the name of the argument rather than nothing. This
    was made so that all variables (env, arguments and [this]) will
    work in the same way.

   -Env variables and arguments can now contain nothing ("").

   -Selector builds the panels on the screen faster.

   -Source file name given in error messages.

   -The @{"unsetenv command" link "unsetenv" 0} was introduced and the @{"unsetenv technique" link "tips" 66} was
    invented.

   -More examples in this document

   
 @{fg shine}Selector 4.30 (960804)@{fg text}
   
   The documentations for version 4.2 and 4.3 was lost in my second
   HardDisk death. I have now (970101) updated this amigaguide document
   with all the changes (from 4.14 to 4.30) that I have found.
   
   -New commands: @{"OnChange," link "onchange" 0} @{"NoBorder," link "border" 0} @{"Version," link "version" 0} @{"Screen" link "screen" 0} and @{"palette" link "palette" 0}.
   
   -The @{"color" link "color" 0} and @{"background" link "backbround" 0} commands were extended.
   
   -The @{"update of the window" link "button" 0} is made much faster if the window
    parameters not are changed (Size, title etc.).
   
   -Some more examples and a new '@{"All Examples" system "run >nil: execute allexamples"}' script
    were added to this document.
 

  @{fg shine}Selector 5.0 (970319)@{fg text}
  
   -Bug on graphics cards and super hires fixed.
   
   -Fonts support. New command: @{"Font" link "font" 0}
   
   -New support program: SelectorFont, to set the default font for
    selector, or request a font in your scripts. This program
    needs asl.library.
   
   -Now possible to open the window on any public screen 
    using the extended @{"SCREEN command." link "screen" 0}
   
   -The @{"X and Y commands" link "x" 0} were extended.  
   
   -New command: @{"OnExit" link "onexit" 0}
   
   -New button/onchange/onexit options: @{"Quit, DumpX, DumpY" link "button" 0}
   
   -The button/onchange/onexit option "Update" will now ignore the X and
    Y commands. If you want selector to behave as before: Use Load [this]
    instead of update.
    
   -AmigaDos1.3 no longer supported. At least AmigaDos2.0 is needed.
    Some of the included examples need AmigaOS3.
    
   -Added @{"Bonus Tools" link "tools" 0}
   
   -The @{"copyrights" link "cr" 0} is changed.

          Greetings to Henrik Thurén, "KnC" McWhirter, Jörn Hansson
            and Stefan Nilsson! Thanks for your help and support!


  @{fg shine}Selector 5.1 (970407)@{fg text}
  
  -I discovered that I needed to use both "-signs and '-signs in strings,
   so I extended the string enclosing signs from ( " and ' ) to
   ( "  '  @  #  £  ^  and  & ). So now you can write for example:
   text ^Isn't this "cool"?^ for the text: Isn't this "cool"?  
   
   Or a little more concrete example:
       screen DM
       button Tempdir  @rx "address DM newdir 'dh2:temp/*'"@
       button ^Mark lha^  &rx "address DM select '*.lha'"&
  
  -Bugfix:
   It wasn't possible to use fonts larger than about 40.
   
  -Bugfix:
   The window became to big when using @{"noborder" link "border" 0}.


  @{fg shine}Selector 5.2 (970422)@{fg text}
  
  -Bugfix: Selector did not work with FastIPrefs or ToolManager.
   Thanks to Stefan Nilsson for the bug report!
  
  -The error handling was extended so that longer error messages
   now can be displayed without problems.
  
  -Bug fixed in the version command.
  
  
  @{fg shine}Selector 5.3 (970521)@{fg text}
  
  -Bugfix: The error handling routine introduced in the last version
   calls the routine that handles string enclosing (with " ' @ etc.)
   So, if there was an error enclosing a string, these two routines
   keept on calling eachother until the stack was overflowed.
  
  -New version of the SelectorFont program. It can now remember what
   font you last selected, so that it won't start with topaz 8 all the
   time. Please note that the shell options not are the same.
   Try "SelectorFont ?" for more specific information.
  
  -New bonus tools: 
       SelectorText: Converts (and optionally reformats) a text file to
                     a selector script file.
              WBRun: Starts a program like it was started from workbench.


  @{fg shine}Selector 5.4 (970529)@{fg text}
  
  -Added new options to the @{"X and Y commands" link "x" 0} that makes it possible to
   open the window where the mouse pointer is. Useful for popup menues etc.
  
  -Changed the noborder command to @{"Border ON/OFF" link "border" 0}. This to make the
   commands more similar to each other. For example: Close ON/OFF, Title OFF
   etc. But the NOBORDER command is still available for compability reasons.
  
  -Reworked the command reference part of the documentation.
  

 -------------------------------------------------------------------------
@endnode

@node "onchange" "The OnChange command"

 @{b}@{fg shine}The OnChange Command@{ub}@{fg text}

 This is a new powerfull command in selector 4.3. It specifies what
 will happend when an env variable is changed.

@{fg shine} OnChange@{fg text} <variable> [to value] ['command 1' 'command 2' ... 'command n']
         [@{fg shine} UPDATE@{fg text} | @{fg shine}LOAD@{fg text} <file> [arguments] | @{fg shine}EXIT@{fg text} [<string>] ]
         | @{fg shine}QUIT@{fg text} [<string>]] | @{fg shine}DumpX@{fg text} <variable> | @{fg shine}DumpY@{fg text} <variable> ]
 
 The first part (OnChange <variable> [to value]) specifies the
 conditions for the the rest of the commands to execute. <variable> is
 the name of the env variable to be watched for any change. If you specify
 the [to value] option, then the commands are only executed if the variable
 is changed to this specified value. The last part (['command 1' ....
 ... 'command n'] [@{fg shine} UPDATE@{fg text} | @{fg shine}LOAD@{fg text} <file>  etc..)
 specifies what will happend, and is stated in exactly the same
 way as in the @{"BUTTON command." link "button" 0}

 Example:
 
        DefEnv test "Change Me!"

        Onchange test to end exit
        Onchange test update

        color light
        text "Current value of test is:"
        color dark light
        text "[test]"
        text
        color dark
        button 'Set it to "Hello!"' 'setenv test "Hello!"'
        button 'Set it to "That is cool!"' 'setenv test "That is cool!"'
        button 'Set it to "end"' 'setenv test end'
 
 This example opens a window with the contents of variable "test".
 Every time the variable is changed, the window is updated. If it
 is changed to "end", the window is closed. You can change the
 variable by pressing the three buttons, or with the setenv command
 from a shell window. The update is not performed right away because
 selector only checks the variables for change every two seconds.
 
 @{"Try it!" system "run >nil: selector onchange.sel"}
 
 If you now @{"Try it again," system "run >nil: selector onchange.sel"} you will see that
 the variable allready is set to "end" (you did it a little while ago,
 remember) and the window is not exiting... why? Well, as the commands
 name is "OnChange", selector won't bother because the variable was not
 CHANGED since the moment the script was last loaded or updated. You must
 first set the variable to something else, wait two seconds, and then set
 it to "end" to close the window.
 
 Also try to start more than one window with the example above, and watch
 how all the windows are updated when you press the button in just
 one of them.

 Observe that you (in the example above) can't place the two onchange
 statements in the opposite order. Then the second statement would never
 be reached. You can look at this as an if....elseif statement.
 
 ---------------------------------------------------------------------
 
 There are two internal values you can use: *any* and *none*
 
    OnChange test to *none* exit
 
 This means that the window will be closed if the env variable "test"
 is unset.
 
    OnChange test to *any* exit
    
 This is the same as:
 
    OnChange test exit
 
 ----------------------------------------------------------------------
 
 Another OnChange example: "The Clock"

        x 2000
        y 11

        exec 'setenv datum `date`'
        onchange datum update
        text "[datum]"

        unsetenv datum
   
 @{"Try it!" system "run >nil: selector clock.sel"}
 
 This script can be quite hard to understand. But it is illustrative for
 how the onchange command works. First the variable "datum"
 is set to the string returned by the amigaOS command "date". Then follows
 the onchange command. It now "remembers" the contents of the variable
 "datum". Then as you can see at the bottom of the script, the variable
 datum is unset. When the whole window is displayed, selector waits about
 two seconds and then compares the old remembered value of "datum" with
 the current one... Oh.. It is changed!!! to nothing (*none*).
 Now, lets see what to do, I have to update.. yes... And then the
 variable is set again by the exec command, and the whole procedure
 is starting all over again.
 
 ----------------------------------------------------------------------
 
 You might want to look at @{"how selector analyses a script." link "env" 19}
@endnode

@node "inst" "inst"

 @{fg shine}Installing@{fg text} is easy...
 
 Just move the executable file "Selector" to your C: directory.


 ------------------------------------------------------------------------
 When you have learned a little bit more about Selector, you might
 want to look at @{"SEL:" link "sel" 0} or @{"Making resident." link "res" 0}
@endnode

@node "onexit" "onexit"

 @{b}@{fg shine}The OnExit Command@{ub}@{fg text}

 This is a new command in selector 5.0. It specifies what
 will happend just before the program ends.

@{fg shine} OnExit@{fg text} ['command 1' 'command 2' ... 'command n']
         [@{fg shine} UPDATE@{fg text} | @{fg shine}LOAD@{fg text} <file> [arguments] | @{fg shine}EXIT@{fg text} [<string>] ]
         | @{fg shine}QUIT@{fg text} [<string>]] | @{fg shine}DumpX@{fg text} <variable> | @{fg shine}DumpY@{fg text} <variable> ]
 
 The syntax is exactly the same as in the @{"BUTTON command." link "button" 0} except that
 no button name is given. There can be only one OnExit command in a source.
 
 The command is executed when the window is closed, using the standard
 close-gadget, when pressing ESC or when an EXIT command is reached from
 a Button/OnChange command. But if the QUIT command is used instead of
 the EXIT command, the OnExit command won't get executed before
 quitting.
 
 Use this command with care! It's possible to make a window you can't
 get rid of, for example:
 
    onExit update
    text "Can't get rid of me!"
 
 
 Better example of OnExit usage:
 
    defenv xvar auto
    defenv yvar auto
    
    x [xvar]
    y [yvar]
    
    onexit dumpx xvar dumpy yvar
    
    text "Move this window around and"
    text "then close it! Open it again!"
    text "Where will it appear next?"
    
 @{"Try it!" system "run >nil: selector onexit.sel"}
@endnode

@node "name" "name"

 @{b}@{fg shine}Name Conflict@{ub}@{fg text}
 
 I have now (970309) found out that there is another "Selector" out there...
 "Program Selector V3.0" by Nico François 1991, and a compatible replacement
 for "Program Selector" called "Chooser V1.0" by Simon Dick 1995. There is
 (in my oppinion) no meaning in using these instead of my "Selector" (Sorry
 guys...). What you can do with these two programs is basically only what
 you can do with the Button and Text commands in my Selector.


@endnode


@node "tools" "tools"

@{b}@{fg shine} Bonu Tools@{ub}@{fg text}

 I have here included some programs that I think is useful in shell scripts
 or directly from selector. They are either FreWare or PD, so you can (as
 I understand) use them however you like. But read the .docs and .readmes
 to be sure.
 
 
 Here they are described:
 ------------------------------------------------------------------------
  @{fg shine}BreakName@{fg text}, by Kai Iske                             @{"(BreakName.doc)" link "/tools/BreakName.doc/main" 0}

        This command is used to break a process with the specified name.


 ------------------------------------------------------------------------
  @{fg shine}Change@{fg text}, By myself
  
        This is used to edit a file, to change all (or some) occurences of
        one text string to another. Try "Change ?" for more information.
  
  
 ------------------------------------------------------------------------
  @{fg shine}Count@{fg text}, By myself
  
       This command counts all occurences of a text string in a file. Try
       "count ?" for more information.
  
  
 ------------------------------------------------------------------------
  @{fg shine}PSRun@{fg text}, By myself
  
       PSRun <PubScreen> <command>, If the public screen exists, then this
       screen is moved to front, else "run >nil: <command>" is executed.
       Try "PSRun ?" for mor info. This is useful to get a button in
       selector to open a program if it isn't allready open, else to
       move to the programs screen. Ex:
       
       button Diskmaster 'psrun DM c:DM2 config.dm'
  
  
 ------------------------------------------------------------------------
  @{fg shine}psx@{fg text}, by Steve Tibbett                               @{"(psx.docs)" link "/tools/psx.docs/main" 0}
  
       A public screen manager. You can open new screens, etc.
       Try "psx ?". You can also start only "psx" and it will open a GUI.
  
  
 ------------------------------------------------------------------------
  @{fg shine}RequestString@{fg text}, by Adam Dawes                     @{"(Requeststring.txt)" link "/tools/requeststring.txt/main" 0}
  
       This command has been described earlier @{"Here" link "env" 99}
       It simply requests a string using the reqtools.library


 ------------------------------------------------------------------------
  @{fg shine}SelectorFont@{fg text}, by myself

       A font requester, more described @{"here." link "font" 0}     
       

 ------------------------------------------------------------------------

  @{fg shine}SelectorText@{fg text}, by myself
       
       This program converts a textfile to a selector file.
       Try "selectortext ?" for more information. Here is a little
       example what you can do with it:
       
			.key text/F

			echo >ram:file1 <text>
			selectortext >ram:file2 ram:file1 50
			echo >>ram:file2 "button Continue exit"
			selector ram:file2
			delete >nil: ram:file1 ram:file2

   @{"Try it as below!" system "run >nil: execute bigmess Please note that this program is shareware. This demo version can only be used odd weeks even days. And this really disturbing info windows keeps poping up every 14 seconds."}
   
   execute bigmess Please note that this program is shareware. This demo version can only be used odd weeks even days. And this really disturbing info windows keeps poping up every 14 seconds.


 ------------------------------------------------------------------------
  @{fg shine}Unsort@{fg text}, by myself
  
       Unsort <textfile>, The file is "line-randomized". If you want things
       to happend in random order, you can for example do this:
       
       list >ram:batfile mods: lformat "modplay %s"
       unsort ram:batfile
       execute ram:batfile
       

 ------------------------------------------------------------------------
  @{fg shine}WBRun@{fg text}, by Sylvain Rougier and Pierre Carrette. @{"(WBRun.doc)" link "/tools/WBRun/WBRun.doc/main" 0}

    A command that runs a program as it had been started from workbench.
    Very useful from selector. WBRun needs parm.library that also is
    included in this package, under Tools/WBRun.

 ------------------------------------------------------------------------

@endnode
