Short: A "RequestFile" like program Author: lorylombus@gmail.com (Lorence Lombardo) Uploader: lorylombus@gmail.com (Lorence Lombardo) Type: util/batch Requires: reqtools.library Version: 3.4 Architecture: m68k-amigaos f-req v3.4 (C) 2006-2021 Lorence Lombardo. What the @#$% is f-req ? f-req is an "OS3.x RequestFile" like program for "1.x+". It might even work fine on MOS and OS4 also. Although like "OS3.x RequestFile" and "OS3.x RequestChoice" f-req is by no means a clone. If a clone is what you are after then I suggest you search on the Aminet. Those of you who are familiar with "OS3.x RequestFile" and "OS3.x RequestChoice" will be familiar with f-req's usage. f-req's usage is as follows:- TITLE, FILE, DRAWER, DRAWERSONLY, PATTERN, MULTISELECT, PUBSCREEN, UNIX SCRIPT, VOLUMESONLY, NOASSIGNS, NODISKS, CHOICE, STRING, LONG, LONGRANGE MODEID, HIDE, NAME, UNS, HEX, 0X, INFO, MOUSE, TOPLEFT, POSITION, SET FONT, FIXED, NOSTYLE, LIST, MEDIA, CHOICEA, LISTNQ, WINDH, RETKEY, ARG2 NOPATGAD, ASK, SPR, STR TITLE title_text This allows you to enter the text string that will appear in the title bar of the window. FILE filename The "filename" will be the selected default file. DRAWER dir The first directory listing will be the specified "dir", and this path will appear in the drawer gadget of the file requestor. DRAWERSONLY Will not show any filenames, only the directory names. PATTERN pat This keyword causes only the files which match that pattern you specify to show up. The user can, however, enter any file he desires by simply entering the filename or by changing the pattern. NOPATGAD When used with the PATTERN keyword the pattern gadget is not shown. MULTISELECT Lets the user select multiple files. These files will be outputed to the console device, seperated by spaces, when the 'OK' button is selected. PUBSCREEN screenname Lets you choose which screen you want the requestor to show up on. UNIX This keyword causes the output paths to be Unix style. In some scripts it will be necessary to obtain Amiga paths first and then convert to Unix. In this case see the archive "a2u.lha" from the aminet. SCRIPT script_name Due to limitations in "OS1.x's" environment variables, this option should be of special interest to "OS1.x" users. This keyword causes the selected file(s) to be a part of a temporary script which will execute a specified ".key" script and pass the file name(s) to that script. eg. f-req >t:temp_script SCRIPT script_name "t:temp_script" will look like this:- execute "script_name" "selected_file" This option has been intended to be used in a pathed environment. VOLUMESONLY This keyword causes only Disk and Assign names to be shown. NOASSIGNS This keyword causes Assign names not to be shown. NODISKS This keyword causes Disk names not to be shown. CHOICE body_text [button1|button2|etc...] This keyword causes f-req to behave like "OS3.x RequestChoice". If this is not the last keyword then a button name should be supplied. Keys can be assigned to buttons with an underscore before a button name letter. RETKEY When used with the CHOICE keywords this allows the [Enter] key to act as the first choice. STRING body_text [default_string] This keyword is similar to the "CHOICE" keyword, except that it will be a string requestor instead. If an empty string (="") is supplied to the "body_text" then the requestor will not have a message part. If this is not the last keyword then a default string should be supplied, use an empty string for no default string. LONG body_text [default_value] This keyword is similar to the "STRING" keyword, except only a value can be entered. If this is not the last keyword then a default value should be supplied, use an empty string for no default value. LONGRANGE body_text minimum maximum [default_value] This keyword is like the "LONG" keyword, but imposes limits on the minimum and maximum number entered. If this is not the last keyword then a default value should be supplied, use an empty string for no default value. MODEID This keyword causes f-req to open a screen mode requestor. The default output ID will be in decimal format. This option is not available to "OS1.x" users. HIDE This keyword causes non standard screen modes to be hidden. NAME This keyword causes the output to use the screen mode name instead of its ID. UNS This keyword causes the output ID to be in unsigned decimal format. (Works with INFO and LIST keywords also.) HEX This keyword causes the output ID to be in hexadecimal format. 0X This keyword causes the output ID to be in "C" style hexadecimal format. INFO This keyword causes all known information about the screen mode to be the output. MOUSE This keyword causes the requestors location to be at the location of the mouse pointer. TOPLEFT This keyword causes the requestors location to be at the top left of the screen. POSITION x y This keyword causes the requestors location to be at the screens "x" and "y" coordinates. SET variable_name This keyword allows you to set a local variable. The advantage of using the inbuilt SET is that you dont lose your return code 5 (warn) upon cancelation. This option will be ignored under "OS1.x". FONT This keyword causes f-req to open a font requestor. The selected font information will be output to the console in a manner which is compatible with CLI's "setfont" command. eg. setfont `f-req font` FIXED Shows only fixed width fonts. NOSTYLE Font style selection is not available. LIST This keyword causes a change in the output layout when used in conjunction with the keywords MULTISELECT, FONT and MODEID. MEDIA body_text This keyword causes f-req to open a requestor which will wait for the insertion of removable media. A "1" will be returned if the insertion of such media is detected. A "0" and warn will be returned if a bypass has occured by the clicking or pressing of "Continue". See the MediaTest script for more information about this keyword. CHOICEA title body_text [button1|button2|etc...] This is like the CHOICE keyword but the title is required. LISTNQ This is like the LIST keyword but quotes will not be used. WINDH This simply converts Amiga paths to Windows paths which could be useful in a WinUAE environment. If a more comprehensive conversion is required then see the archive "a2w.lha". ARG2 When this keyword is the first arguments will be gathered more so in an OS2+ like fashion. This mostly effects requestors having a "body_text". ASK body_text But1 But2 This is like the CHOICE keyword but all arguments are required. Other keywords relevent to CHOICE also apply. A warn is given for the first choice. SPR value These values correspond to the respective order of variants of %lc, %lx, %ld and %lu in requestors having a "body_text". "%lu" is not available under "OS1.x". STR string This keyword places an additional string in requestors having a "body_text" with a %s and shares its order with the SPR keyword. f-req will return an empty string (="") upon cancelation, except for when the MODEID keyword is used then the word "quit" will be returned. All requestors will have a return code of 5 (warn) upon cancelation. For all requestors having a "body_text" a "*N" can be used to obtain a new line. See the archive "LHA_HD_Install.lha" on the aminet for an example of a script using f-req. See the archive "ReqToolsUsr.lha" on the aminet for more information about the "reqtools.library". Distribution: Please distribute f-req with this documentation. web page:- http://geocities.ws/lorylomb/