Short: RAChoice, a RequestChoice replacement Author: flype44 (at) gmail (dot) com (Philippe CARPENTIER) Uploader: flype44 gmail com (Philippe CARPENTIER) Type: util/cli Version: 1.1 Requires: AmigaOS 3.2+ (V47+) Architecture: m68k-amigaos >= 3.2 URL: https://github.com/flype44/AmigaOS/tree/main/RAChoice RAChoice is a ReAction-based command with following features: 1. It is a ReAction replacement for the official Commodore C:RequestChoice (V45.3+) Intuition command. 2. It can load BODY from a FILE, preserving the Line Feeds. 3. It can display predefined pictograms. 4. It can display datatype image from disk (including icons). Source code is included (SAS/C). ------------------------------------------------------------------------------- Changes in V1.1: * First public version. * Added PUBSCREEN support. * Added REBOOT.r example script. * Added rachoice.help (to use with '> help rachoice'). * Various code cleanups. Changes in V1.0: * First private version. ------------------------------------------------------------------------------- Help: NAME RACHOICE - Allows AmigaDOS and ARexx scripts to use Reaction-based message requesters. FORMAT RACHOICE <BODY> <GADGETS> [PUBSCREEN <public screen name>] [SET] [IMAGE <image filename>] [FILE] TEMPLATE TITLE/A,BODY/A,GADGETS/A/M,PUBSCREEN/K,SET/K,IMAGE/K,FILE/S PATH C:RACHOICE FUNCTION The "TITLE" argument specifies the title of the requester. The "BODY" argument specifies the text of the requester. Line feeds can be embedded using *N. The "GADGETS" argument specifies the text for the different gadgets. The gadget labels are separated with spaces. The "PUBSCREEN" argument allows the requester to open its window on a public screen. "SET" makes RACHOICE Copy the selected choice into a Shell variable. The "FILE" argument indicates that the BODY argument is a filename. The file will be loaded from disk, and displayed in the requester. The "IMAGE" argument specifies the image of the requester, among : "INFO" - Display a INFO image. "WARNING" - Display a WARNING image. "ERROR" - Display a ERROR image. "QUESTION" - Display a QUESTION image. "INSERTDISK" - Display a INSERTDISK image. ELSE, load any supported datatype image from disk. EXAMPLES 1> Set rcnum `RAChoice "New Title" "This is my requester*nSelect a gadget" "OK" "Maybe" "Cancel"` 2> Echo $rcnum The local shell variable rcnum contains 1, 2, or 0 (respectively) after a gadget is selected. The script can use this value to control its later execution. 1> RAChoice Info Line Ok SET="rcnum" 1> RAChoice "Info" "line1*nline2" "_ok|_cancel" 1> RAChoice "Warn" "line1*nline2" "_ok|_cancel" IMAGE="WARNING" 1> RAChoice "Warn" "line1*nline2" "_ok|_cancel" IMAGE="RAM:WARN.PNG" 1> RAChoice "Warn" "line1*nline2" "_ok|_cancel" IMAGE="RAM:WARN.info" The IMAGE argument can use predefined pictograms, or any datatype capable image from the disk. 1> C:Status >T:0 2> RAChoice Status T:0 Ok FILE T:0 is here a temporary file where we store some information. The FILE argument in the RAChoice command indicates to load that file. SEE ALSO REQUESTCHOICE -------------------------------------------------------------------------------