home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / alib / d8xx / d868 / request.lha / Request / Request.doc < prev    next >
Text File  |  1992-10-07  |  4KB  |  114 lines

  1.  
  2.                                Request
  3.  
  4.                            by Stefan Sticht
  5.  
  6.                             PUBLIC DOMAIN
  7.  
  8.  
  9.  
  10.  
  11. IMPORTANT:
  12. Request requires Kickstart and Workbench 2.0 (at least Kickstart 37.*) !!
  13.  
  14. Request  opens an EasyRequester (AutoRequester) with user text and gadgets.
  15. Designed for use in script files; a sophisticated replacement for ask.
  16.  
  17.  
  18.                                  U s a g e
  19.  
  20.  Text/A,Title/K,Gadgets/K,PubScreen/K,DefaultPubScreen/S,FrontPubScreen/S
  21.  
  22. <text>:
  23. Text to be displayed in the Requester.  This parameter is required.  Use *N
  24. to get a linefeed.
  25.         
  26. TITLE <title>:
  27. The title of the requester.
  28.  
  29. Gadgets <gadgets>:
  30. You  may  specify up to 20 gadgets.  Gadgets are seperated by a "|".  If no
  31. gadget is specified, an "OK" gadget will be used.
  32.  
  33. PubScreen <publicscreenname>:
  34. The  name  of a public screen, on which the requester should open.  Use the
  35. public  screen  "Workbench" if you want the requester on the workbench.  If
  36. the public screen isn't available, a returncode 20 is returned.
  37.  
  38. DefaultPubScreen:
  39. This  switch  tells  Request  to  use  the  default  public  screen.  Using
  40. PubScreen and DefaultPubScreen together means:  try to use the named public
  41. screen,  if  it's  not  vailable use the default public screen.  If neither
  42. PubScreen    nor   DefaulPubScreen   nor   FrontPubScreen   is   specified,
  43. the default public screen is used.
  44.  
  45. FrontPubScreen:
  46. Specify  this  switch  if  the  frontmost  screen should be used, if it's a
  47. public  screen.   If  not,  the  default public screen will be used.  Using
  48. DefaultPubScreen   and  FrontPubScreen  both  is  the  same.   If  you  use
  49. FrontPubScreen  and  PubScreen, the front screen will be used.  If this one
  50. isn't  public,  the  named  public  screen will be used.  If this one isn't
  51. available,  a  returncode 20 is returned.  Using PubScreen, DefaulPubScreen
  52. and  FrontPubScreen  together,  the  window  will  open on the front public
  53. screen.   If  this  fails, the named public screen is used.  If this fails,
  54. too, the default screen will be used.
  55.  
  56.  
  57.                            R e t u r n c o d e s
  58.  
  59. Which  gadget  the  user  selected  can  be  examined  by  looking  at  the
  60. ReturnCode:  If you use the Workbench 2.0 Shell, look at the local variable
  61. RC for the ReturnCode.  From ARexx you may examine the variable RC.  If you
  62. only  specify  one gadget, its returncode will always be 0.  If you specify
  63. more  than one gadget, the leftmost gadget will return 1, the rightmost one
  64. will return 0.  The gadgets between will return 2, 3, 4 etc.
  65.  
  66.                       1 2 3 4 5 6 7 8 9 10 ... 0
  67.                       |                        |
  68.      leftmost gadget -+                        +- rightmost gadget
  69.  
  70.  
  71. Try out these examples:
  72.  
  73. Request "This is a test!" TITLE "Test:" GADGETS "O.K."
  74. Request "This shows you the return codes of the Gadgets:" GADGETS "RC=1|RC=2|RC=3|RC=0"
  75. Request "Multi*Nlines*Nshown*Nhere!" GADGETS "YES|NO"
  76. Request "This is a test on the CED screen!" PubScreen CygnusEdScreen1
  77.  
  78. ; --- CUT HERE ---
  79. ; Here's a script for testing Request
  80. Request "Do you like this requester?" TITLE "A question:" GADGETS "Yes|Dont' know|NO"
  81. Set ANSWER $RC
  82. Echo "Returncode was" $ANSWER
  83. If $ANSWER EQ 1
  84.     Echo "You like it!"
  85. EndIf
  86. If $ANSWER EQ 2
  87.     Echo "But you should know!"
  88. EndIf
  89. If $ANSWER EQ 0
  90.     Echo "Why not?"
  91. EndIf
  92. UnSet ANSWER
  93. ; --- CUT HERE ---
  94.  
  95.  
  96. Return codes:
  97.     40: Error in command line
  98.     30: Can't open intuition.library V37 or higher
  99.     20: Named public screen can't be found!
  100.     anything below 20: The number of the gadget, the user pressed.
  101.  
  102.  
  103.  
  104. Send bug-reports, enhancement-requests, questions, gifts to:
  105. ------------------------------------------------------------
  106. Stefan Sticht
  107. Bibereckerweg 40a
  108. D-8390 Passau 18
  109. FRG
  110.  
  111. or (better) EMail to:
  112. sticht@edith.deg.sub.org
  113. Fido-Net: Stefan Sticht (2:246/200.4)
  114.