home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / utilities / boot / magicscrip.lha / MagicScripts / Documentation / ReqAsk.Man < prev   
Encoding:
Text File  |  1995-01-11  |  3.8 KB  |  122 lines

  1.  
  2.  
  3.     ReqAsk V1.2                 User manual                  ReqAsk V1.2
  4.  
  5.  
  6.     NAME 
  7.         ReqAsk 
  8.  
  9.     SYNOPSIS 
  10.         ReqAsk [BODYFMT/A] Bodytext [[GADFMT] Gadgettext] [[TITLE]
  11.                Titlestring] [[VAR] Variablename ] [GLOBAL] 
  12.  
  13.     DESCRIPTION 
  14.         NOTE: This program requires OS 2.04+ to run! 
  15.  
  16.         ReqAsk  is  a  replacement for Commodores Ask command. The major
  17.         difference  between  ReqAsk  and  Ask  is  that  ReqAsk  opens a
  18.         requester.  It  also allows more than two different answers, and
  19.         they  can  be whatever you like. The requester is the normal one
  20.         used  by e.g. Workbench. The program is fully re-entrant and can
  21.         be   made   resident.   Beware   of  environment  variable  name
  22.         collissions if you use the GLOBAL switch.  
  23.  
  24.     OPTIONS 
  25.         You  must  supply  a  bodytext. The other arguments have default
  26.         values.  The keywords (see below) is only required if you do not
  27.         enter  the  strings  in the ordering as above. Strings only need
  28.         to be quoted if they contain spaces.  
  29.  
  30.         BODYFMT 
  31.             This  is  a  string containing the text that should be shown
  32.             in  the  requester.   This  argument must be present. If you
  33.             want  a  linefeed  in  the  text,  enter  "*n" which will be
  34.             transformed  to  a  normal  LF char. An empty string like ""
  35.             isn't accpeted by ReqAsk.  
  36.  
  37.         GADGETFMT 
  38.             This  argument  specifies  what  gadgets  you  want  in  the
  39.             requester.  To  specify  more  that one gadget, separate the
  40.             gadgets  with  a vertical bar ("|"). E.g.  "Ok|Cancel" gives
  41.             two  gadgets,  leftmost  called "Ok", while the rightmost is
  42.             called "Cancel".  
  43.  
  44.             The  returned  value  (see  below on how to obtain it) is as
  45.             follows:  The  rightmost  gadget has a return value of zero.
  46.             This  should  be  a  negative response (such as cancel). The
  47.             other  gadgets  (if  any),  will  be numbered - from left to
  48.             right  -  with  increasing number, starting with 1. Thus, if
  49.             you  have a gadget format like: "Yes|Maybe|No|Just kiddin!",
  50.             clicking  "Yes"  will  return  1,  "Maybe"  returns  2, "No"
  51.             returns 3 and finally "Just kiddin!" returns 0.  
  52.  
  53.             Default is two gadgets named "Yes" and "No" ("Yes|No").  
  54.  
  55.             NOTE:  If  you  have  more than 10 gadgets, the return value
  56.             when  a  gadget  with ordinal number (as "calculated" above)
  57.             larger  than 10 is selected, will be "strange" (such as ';',
  58.  
  59.  
  60.                                    Page 1
  61.  
  62.  
  63.     ReqAsk V1.2                 User manual                  ReqAsk V1.2
  64.  
  65.  
  66.             '<'...)  But  it  isn't  that easy to fit in 10 gadgets in a
  67.             normal requester, so... ;) 
  68.  
  69.         TITLE 
  70.             This  optional  string  specifies the title in the requester
  71.             window.   It   defaults  to  "System  Request"  if  none  is
  72.             specified.  
  73.  
  74.         VAR 
  75.             This  string  lets  you  specify in which local variable the
  76.             result  will  be  stored  (as a numeric string). The default
  77.             name is "ReqAskResult".  
  78.  
  79.         GLOBAL 
  80.             By  default,  ReqAsk  will  place  the  answer  in  a  local
  81.             environment  variable.  But this has one drawback: You can't
  82.             access  the  result  easily from ARexx. If you have set this
  83.             flag,  it  will  be  quite  easy.  Simply  peek  in the ENV:
  84.             directory.  :) 
  85.  
  86.     EXAMPLE 
  87.         ReqAsk "Do you like this program?" 
  88.         If $GetAskResult EQ 0
  89.            Echo "Why not??"
  90.         Else
  91.            Echo "I thought you would! :)"
  92.         EndIf
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.                                    Page 2
  121.  
  122.