home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / utilities / misc / request2.03.lha / Request2.03 / Request.doc < prev    next >
Encoding:
Text File  |  1994-11-11  |  7.3 KB  |  217 lines

  1.  
  2.                                Request 2.03
  3.  
  4.                  by Stefan Sticht and Goncalves A. Georges
  5.  
  6.                             PUBLIC DOMAIN
  7.  
  8. IMPORTANT:
  9. Request requires Kickstart and Workbench 2.04 (at least Kickstart 37.175) !!
  10.  
  11. Request  opens an rtEZRequest() of the reqtools.library with user text and
  12. gadgets. Designed for use in script files.
  13. A (very :-) sophisticated replacement for ask.
  14.  
  15.        Request  (initial version and up to 1.04) is © Stefan Sticht !
  16.                 Request 2.00 (private release) and above are _NOT_
  17.                 © Goncalves A. Georges but still Stefan Sticht! it's only
  18.                 an improvement.
  19.  
  20.        Reqtools is © Nico François (what a marvellous library, thanks a lot
  21.                 Nico!)
  22.  
  23.  
  24.                                  U s a g e
  25.  
  26. TEXT/A,TITLE/K,GADS=GADGETS/K,C=CENTER/S,DEF=DEFAULT/K/N,NODEF=NODEFAULT/S,FLASH/S,
  27. PS=PUBSCREEN/K,DEFPS=DEFAULTPUBSCREEN/S,FRONTPS=FRONTPUBSCREEN/S
  28.  
  29. TEXT <text>:
  30. ¯¯¯¯¯¯¯¯¯¯¯¯
  31. ( /A = Argument. The user MUST pass an argument )
  32.  
  33. Text to be displayed in the Requester.  This parameter is required.  Use *N
  34. to get a linefeed.
  35.  
  36.  
  37. TITLE <title>:
  38. ¯¯¯¯¯¯¯¯¯¯¯¯¯¯
  39. ( /K = Key. The user must type the key name followed bythe key-word )
  40.  
  41. The title of the requester. If no title is specified reqtools use "Information"
  42. for a one gadget requester and "Request" for multi-gadgets requester.
  43.  
  44.  
  45. GADS=GADGETS <gadgets>:
  46. ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
  47. ( /K = Key. The user must type the key name followed by the key-word )
  48.  
  49. You  may  specify up to 20 gadgets.  Gadgets are seperated by a "|".  If no
  50. gadget is specified, an "Okay" gadget will be used. You may use underscore
  51. feature of the reqtools by using an underscore before the letter you want
  52. to be the underscore in the gadget name (see examples). When you press the
  53. underlined key of the gadget and you want to cancel it, hold the key pressed
  54. and press any shift key, it will unselect the pressed key.
  55. In case you have made a mistake giving the same shorcut for two or more gadgets,
  56. no matter! the reqtools will use the first shorcut but not the others (Nico, you
  57. are simply amazing! you've thought about all that can be thought).
  58.  
  59. example: ... Gadgets "_Start|_Continue|_Cancel" ... Reqtools will only allow you
  60.          to select 'Continue' by the 'C' shortcut but not 'Cancel' you'll have
  61.          to grab your mouse and click!
  62.  
  63.  
  64. C=CENTER:
  65. ¯¯¯¯¯¯¯¯¯
  66. ( /S = Switch. The user can type the switch name in order to select the option )
  67.  
  68. Centers the text of the requester line by line.
  69.  
  70.  
  71. DEF=DEFAULT <number>:
  72. ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
  73. ( /N = Number. The user enters a number to use this option )
  74.  
  75. You may choose which gadget is the default response. In this case, the text of
  76. the gadget is displayed in bold and pressing return will activate it.
  77. The first gadget is numbered 1 and so on but the right most gadget is 0.
  78.  
  79.  
  80. NODEF=NODEFAULT:
  81. ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
  82. ( /S = Switch. The user can type the switch name in order to select the option )
  83.  
  84. Specifying this option will remove the bold effect of the first or specified
  85. gadget and it will no longer be selectable with the return key. Note that this
  86. option override the Default option whatever number entered.
  87.  
  88.  
  89. FLASH:
  90. ¯¯¯¯¯¯
  91. ( /S = Switch. The user can type the switch name in order to select the option )
  92.  
  93. Specifying this option will flash the screen just before opening the requester.
  94. Why ? Simply because the requester text can be very important and must catch the
  95. reader attention. This option has been added for sleepy users like me :-)
  96.  
  97.  
  98. PS=PUBSCREEN <publicscreenname>:
  99. ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
  100. ( /K = Key. The user must type the key name followed by the key-word )
  101.  
  102. The  name  of a public screen, on which the requester should open.  Use the
  103. public  screen  "Workbench" if you want the requester on the workbench.  If
  104. the public screen isn't available, a returncode 20 is returned.
  105.  
  106.  
  107. DEFPS=DEFAULTPUBSCREEN:
  108. ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
  109. ( /S = Switch. The user can type the switch name in order to select the option )
  110.  
  111. This  switch  tells  Request  to  use  the  default  public  screen.  Using
  112. PubScreen and DefaultPubScreen together means:  try to use the named public
  113. screen,  if  it's  not  vailable use the default public screen.  If neither
  114. PubScreen    nor   DefaulPubScreen   nor   FrontPubScreen   is   specified,
  115. the default public screen is used.
  116.  
  117. FRONTPS=FRONTPUBSCREEN:
  118. ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
  119. ( /S = Switch. The user can type the switch name in order to select the option )
  120.  
  121. Specify  this  switch  if  the  frontmost  screen should be used, if it's a
  122. public  screen.   If  not,  the  default public screen will be used.  Using
  123. DefaultPubScreen   and  FrontPubScreen  both  is  the  same.   If  you  use
  124. FrontPubScreen  and  PubScreen, the front screen will be used.  If this one
  125. isn't  public,  the  named  public  screen will be used.  If this one isn't
  126. available,  a  returncode 20 is returned.  Using PubScreen, DefaulPubScreen
  127. and  FrontPubScreen  together,  the  window  will  open on the front public
  128. screen.   If  this  fails, the named public screen is used.  If this fails,
  129. too, the default screen will be used.
  130.  
  131.  
  132.                            R e t u r n C o d e s
  133.  
  134. Which  gadget  the  user  selected  can  be  examined  by  looking  at  the
  135. ReturnCode:  If you use the Workbench 2.0 Shell, look at the local variable
  136. RC for the ReturnCode.  From ARexx you may examine the variable RC.  If you
  137. only  specify  one gadget, its returncode will always be 0.  If you specify
  138. more  than one gadget, the leftmost gadget will return 1, the rightmost one
  139. will return 0.  The gadgets between will return 2, 3, 4 etc.
  140.  
  141.                       1 2 3 4 5 6 7 8 9 10 ... 0
  142.                       |                        |
  143.      leftmost gadget -+                        +- rightmost gadget
  144.  
  145.  
  146. Try out these examples:
  147.  
  148. Request TEXT "This is a test!" TITLE "Test:" GADGETS "O.K."
  149.  
  150. Request TEXT "This shows you the return codes of the Gadgets:" GADGETS "RC=1|RC=2|RC=3|RC=0"
  151.  
  152. Request TEXT "Multi*Nlines*Nshown*Nhere!" GADGETS "YES|NO"
  153.  
  154. Request TEXT "This lines are auto centered*Nline by line*Nas you can see!" CENTER
  155.  
  156. Request TEXT "Would you like to use shorcuts*Ninstead of mouse ?" GADGETS "_Great|_Not bad|No _matter"
  157.  
  158. Request TEXT "The default can be anyone of these" GADGETS "I see|What ?|Oh ! great" DEFAULT 2
  159.  
  160. Request TEXT "This is a test on the CED screen!" PUBSCREEN CygnusEdScreen1
  161.  
  162. ; --- CUT HERE ---
  163. ; Here's a script for testing Request
  164.  
  165. Request TEXT "Do you like this requester ?" TITLE "A question:" GADGETS "N_ot too Bad|_Yes|_Dont' know|_NO" DEFAULT 2
  166. Set ANSWER $RC
  167. Echo "Returncode was" $ANSWER
  168. If $ANSWER EQ 1
  169.     Echo "That's all you think of it ?"
  170. EndIf
  171. If $ANSWER EQ 2
  172.     Echo "You like it !"
  173. EndIf
  174. If $ANSWER EQ 3
  175.     Echo "But you should know!"
  176. EndIf
  177. If $ANSWER EQ 0
  178.     Echo "Why not ?"
  179. EndIf
  180. UnSet ANSWER
  181.  
  182. ; --- CUT HERE ---
  183.  
  184.  
  185. Return codes:
  186.     40: Error in command line
  187.     30: Can't open intuition.library V37 or higher
  188.     20: Named public screen can't be found!
  189.     anything below 20: The number of the gadget, the user pressed.
  190.  
  191.  
  192.  
  193. Send bug-reports, enhancement-requests, questions, gifts to:
  194. ------------------------------------------------------------
  195.  
  196. Stefan Sticht
  197. Bibereckerweg 40a
  198. D-8390 Passau 18
  199. FRG
  200.  
  201. or (better) EMail to:
  202. sticht@edith.deg.sub.org
  203. Fido-Net: Stefan Sticht (2:246/200.4)
  204.  
  205.  
  206. You can also contact :
  207. ----------------------
  208.  
  209. Georges Goncalves
  210. 27, rue Morand
  211. 75011 Paris
  212. France
  213.  
  214. if you have detected bugs ( I think its not possible ;-) ) in version
  215. 2.xx of request !
  216.  
  217.