wiki:Documentation/ARexxAPI/REQUESTFILE

Version 4 (modified by AmigaPhil, 14 months ago) (diff)

--

Languages:


ARexx API

    REQUESTFILE

    NAME

    RequestFile -- Request the user to select a file. (V2.6)

    TEMPLATE

    VAR/K,STEM/K,TITLE/A,DRAWER,FILE,MULTISELECT/S,DRAWERSONLY/S,SAVEMODE/S,NOICONS/S

    FUNCTION

    Requests the user to select a file.

    INPUTS

    VAR/K - alternative variable to put the results into instead of RESULT
    STEM/K - base name used for the stem where the result will be stored
    TITLE/A - the title of the file requester
    DRAWER - initial drawer when opening the requester
    FILE - initial file when opening the requester
    MULTISELECT/S - enable multiselection
    DRAWERSONLY/S - exclude files from selection
    SAVEMODE/S - set requester to "save mode", no selection via doubleclick will be possible then
    NOICONS/S - hide icon files

    RETURNS

    VAR - info returned by the query
    <STEM>DRAWER - name of the selected drawer
    <STEM>FILES - names of the selected files

    RC is set to 1 if the user cancels the requester.

    NOTES

    EXAMPLE

    /* Enable result codes */
    OPTIONS RESULTS

    REQUESTFILE title="Please select a file" drawer="RAM:" STEM files.

    IF RC~= 0 THEN EXIT

    SAY "selected drawer is '" files.drawer "'"
    DO i=0 to files.COUNT-1

    SAY "selected file '" files.files.i "'"

    END

    BUGS

    SEE ALSO