Contents | Index | < Browse | Browse >

 CONSTRUCTING COMMAND LINES
 ======================================================================
 You can express many weird combinations of characters in Gui4Cli
 allowing you to form just about any string, with or without variables, 
 non-printable characters etc.. These combinations are usefull in forming 
 other variables or CLI command lines..

 NOTE:
 All special characters below, should be preceded by ONE BackSlash char. 
 Some versions of AmigaGuide will not show you the backslash unless it's 
 preceded by another backslash, so if you're seeing double backslashes
 remember they should be single ones..

 Special Characters : 
 --------------------
 You can use the following special characters inside command lines :

   \n   = (BackSlash + n) NewLine
   \r   = Carriage return
   \t   = Tab

   \#   = starts a character expressed as a decimal value
             ex : Say '\#7'
          will cause the screen to flash (7 is the decimal value
          of the "beep" or "bell" character). Another example :
             ex : Say "\#155\1;33;40;>0mText is now color 3"
          will print "Text is now color 3" in your console in
          color 3. All text will now be in color 3, until reset.

          The Amiga console device has *many*  such commands, with 
          which you can output to and control a shell as you need.

   Any other character which is preceded by a \ will be written literally.
   So, you can write :

   \\   = the BackSlash character itself
   \"   = the " character
   \'   = the ' character
   \$   = the $ character
   \A   = character A
  ..... etc

 With the above you can do many usefull tricks such as having
  Variables within variables 

 Joining variables:
 ------------------------
   The slash "\" character will also end a variable name. 
   So if you wanted for example to append ".info" to a filename which 
   you have stored in a variable, you can do this :

   > filename = MyFile
   > say "$filename.info"
   will print "MyFile.info"

   It can also be done with the  AppVar  command..

 Joining filenames:
 ------------------------
   This can best be done with the  JoinFile  command which will also
   take care of quotes, slashes etc..  

 Weird Stuff :
 ------------------------
   For some reason the console device will replace $$ with
   nothing. So if you want to, say, send a rexx command to Gui4Cli
   with GRX, containing an internal variable, you must do this:

   > grx Gui4Cli say \$\$G4C.dir

   This will print out Gui4Cli's current dir.