home *** CD-ROM | disk | FTP | other *** search
-
- Request
-
- by Stefan Sticht
-
- PUBLIC DOMAIN
-
-
-
-
- IMPORTANT:
- Request requires Kickstart and Workbench 2.0 (at least Kickstart 37.*) !!
-
- Request opens an EasyRequester (AutoRequester) with user text and gadgets.
- Designed for use in script files; a sophisticated replacement for ask.
-
-
- U s a g e
-
- Text/A,Title/K,Gadgets/K,PubScreen/K,DefaultPubScreen/S,FrontPubScreen/S
-
- <text>:
- Text to be displayed in the Requester. This parameter is required. Use *N
- to get a linefeed.
-
- TITLE <title>:
- The title of the requester.
-
- Gadgets <gadgets>:
- You may specify up to 20 gadgets. Gadgets are seperated by a "|". If no
- gadget is specified, an "OK" gadget will be used.
-
- PubScreen <publicscreenname>:
- The name of a public screen, on which the requester should open. Use the
- public screen "Workbench" if you want the requester on the workbench. If
- the public screen isn't available, a returncode 20 is returned.
-
- DefaultPubScreen:
- This switch tells Request to use the default public screen. Using
- PubScreen and DefaultPubScreen together means: try to use the named public
- screen, if it's not vailable use the default public screen. If neither
- PubScreen nor DefaulPubScreen nor FrontPubScreen is specified,
- the default public screen is used.
-
- FrontPubScreen:
- Specify this switch if the frontmost screen should be used, if it's a
- public screen. If not, the default public screen will be used. Using
- DefaultPubScreen and FrontPubScreen both is the same. If you use
- FrontPubScreen and PubScreen, the front screen will be used. If this one
- isn't public, the named public screen will be used. If this one isn't
- available, a returncode 20 is returned. Using PubScreen, DefaulPubScreen
- and FrontPubScreen together, the window will open on the front public
- screen. If this fails, the named public screen is used. If this fails,
- too, the default screen will be used.
-
-
- R e t u r n c o d e s
-
- Which gadget the user selected can be examined by looking at the
- ReturnCode: If you use the Workbench 2.0 Shell, look at the local variable
- RC for the ReturnCode. From ARexx you may examine the variable RC. If you
- only specify one gadget, its returncode will always be 0. If you specify
- more than one gadget, the leftmost gadget will return 1, the rightmost one
- will return 0. The gadgets between will return 2, 3, 4 etc.
-
- 1 2 3 4 5 6 7 8 9 10 ... 0
- | |
- leftmost gadget -+ +- rightmost gadget
-
-
- Try out these examples:
-
- Request "This is a test!" TITLE "Test:" GADGETS "O.K."
- Request "This shows you the return codes of the Gadgets:" GADGETS "RC=1|RC=2|RC=3|RC=0"
- Request "Multi*Nlines*Nshown*Nhere!" GADGETS "YES|NO"
- Request "This is a test on the CED screen!" PubScreen CygnusEdScreen1
-
- ; --- CUT HERE ---
- ; Here's a script for testing Request
- Request "Do you like this requester?" TITLE "A question:" GADGETS "Yes|Dont' know|NO"
- Set ANSWER $RC
- Echo "Returncode was" $ANSWER
- If $ANSWER EQ 1
- Echo "You like it!"
- EndIf
- If $ANSWER EQ 2
- Echo "But you should know!"
- EndIf
- If $ANSWER EQ 0
- Echo "Why not?"
- EndIf
- UnSet ANSWER
- ; --- CUT HERE ---
-
-
- Return codes:
- 40: Error in command line
- 30: Can't open intuition.library V37 or higher
- 20: Named public screen can't be found!
- anything below 20: The number of the gadget, the user pressed.
-
-
-
- Send bug-reports, enhancement-requests, questions, gifts to:
- ------------------------------------------------------------
- Stefan Sticht
- Bibereckerweg 40a
- D-8390 Passau 18
- FRG
-
- or (better) EMail to:
- cbmvax.commodore.com!cbmehq!cbmger!edith!sticht
- or IWSTICHT@ibm.rz.uni-passau.de
- Fido-Net: Stefan Sticht (2:242/77:4)
-