home *** CD-ROM | disk | FTP | other *** search
-
- Request 2.03
-
- by Stefan Sticht and Goncalves A. Georges
-
- PUBLIC DOMAIN
-
- IMPORTANT:
- Request requires Kickstart and Workbench 2.04 (at least Kickstart 37.175) !!
-
- Request opens an rtEZRequest() of the reqtools.library with user text and
- gadgets. Designed for use in script files.
- A (very :-) sophisticated replacement for ask.
-
- Request (initial version and up to 1.04) is © Stefan Sticht !
- Request 2.00 (private release) and above are _NOT_
- © Goncalves A. Georges but still Stefan Sticht! it's only
- an improvement.
-
- Reqtools is © Nico François (what a marvellous library, thanks a lot
- Nico!)
-
-
- U s a g e
-
- TEXT/A,TITLE/K,GADS=GADGETS/K,C=CENTER/S,DEF=DEFAULT/K/N,NODEF=NODEFAULT/S,FLASH/S,
- PS=PUBSCREEN/K,DEFPS=DEFAULTPUBSCREEN/S,FRONTPS=FRONTPUBSCREEN/S
-
- TEXT <text>:
- ¯¯¯¯¯¯¯¯¯¯¯¯
- ( /A = Argument. The user MUST pass an argument )
-
- Text to be displayed in the Requester. This parameter is required. Use *N
- to get a linefeed.
-
-
- TITLE <title>:
- ¯¯¯¯¯¯¯¯¯¯¯¯¯¯
- ( /K = Key. The user must type the key name followed bythe key-word )
-
- The title of the requester. If no title is specified reqtools use "Information"
- for a one gadget requester and "Request" for multi-gadgets requester.
-
-
- GADS=GADGETS <gadgets>:
- ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
- ( /K = Key. The user must type the key name followed by the key-word )
-
- You may specify up to 20 gadgets. Gadgets are seperated by a "|". If no
- gadget is specified, an "Okay" gadget will be used. You may use underscore
- feature of the reqtools by using an underscore before the letter you want
- to be the underscore in the gadget name (see examples). When you press the
- underlined key of the gadget and you want to cancel it, hold the key pressed
- and press any shift key, it will unselect the pressed key.
- In case you have made a mistake giving the same shorcut for two or more gadgets,
- no matter! the reqtools will use the first shorcut but not the others (Nico, you
- are simply amazing! you've thought about all that can be thought).
-
- example: ... Gadgets "_Start|_Continue|_Cancel" ... Reqtools will only allow you
- to select 'Continue' by the 'C' shortcut but not 'Cancel' you'll have
- to grab your mouse and click!
-
-
- C=CENTER:
- ¯¯¯¯¯¯¯¯¯
- ( /S = Switch. The user can type the switch name in order to select the option )
-
- Centers the text of the requester line by line.
-
-
- DEF=DEFAULT <number>:
- ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
- ( /N = Number. The user enters a number to use this option )
-
- You may choose which gadget is the default response. In this case, the text of
- the gadget is displayed in bold and pressing return will activate it.
- The first gadget is numbered 1 and so on but the right most gadget is 0.
-
-
- NODEF=NODEFAULT:
- ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
- ( /S = Switch. The user can type the switch name in order to select the option )
-
- Specifying this option will remove the bold effect of the first or specified
- gadget and it will no longer be selectable with the return key. Note that this
- option override the Default option whatever number entered.
-
-
- FLASH:
- ¯¯¯¯¯¯
- ( /S = Switch. The user can type the switch name in order to select the option )
-
- Specifying this option will flash the screen just before opening the requester.
- Why ? Simply because the requester text can be very important and must catch the
- reader attention. This option has been added for sleepy users like me :-)
-
-
- PS=PUBSCREEN <publicscreenname>:
- ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
- ( /K = Key. The user must type the key name followed by the key-word )
-
- 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.
-
-
- DEFPS=DEFAULTPUBSCREEN:
- ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
- ( /S = Switch. The user can type the switch name in order to select the option )
-
- 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.
-
- FRONTPS=FRONTPUBSCREEN:
- ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
- ( /S = Switch. The user can type the switch name in order to select the option )
-
- 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 TEXT "This is a test!" TITLE "Test:" GADGETS "O.K."
-
- Request TEXT "This shows you the return codes of the Gadgets:" GADGETS "RC=1|RC=2|RC=3|RC=0"
-
- Request TEXT "Multi*Nlines*Nshown*Nhere!" GADGETS "YES|NO"
-
- Request TEXT "This lines are auto centered*Nline by line*Nas you can see!" CENTER
-
- Request TEXT "Would you like to use shorcuts*Ninstead of mouse ?" GADGETS "_Great|_Not bad|No _matter"
-
- Request TEXT "The default can be anyone of these" GADGETS "I see|What ?|Oh ! great" DEFAULT 2
-
- Request TEXT "This is a test on the CED screen!" PUBSCREEN CygnusEdScreen1
-
- ; --- CUT HERE ---
- ; Here's a script for testing Request
-
- Request TEXT "Do you like this requester ?" TITLE "A question:" GADGETS "N_ot too Bad|_Yes|_Dont' know|_NO" DEFAULT 2
- Set ANSWER $RC
- Echo "Returncode was" $ANSWER
- If $ANSWER EQ 1
- Echo "That's all you think of it ?"
- EndIf
- If $ANSWER EQ 2
- Echo "You like it !"
- EndIf
- If $ANSWER EQ 3
- 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:
- sticht@edith.deg.sub.org
- Fido-Net: Stefan Sticht (2:246/200.4)
-
-
- You can also contact :
- ----------------------
-
- Georges Goncalves
- 27, rue Morand
- 75011 Paris
- France
-
- if you have detected bugs ( I think its not possible ;-) ) in version
- 2.xx of request !
-
-