Topic : The GFA-Basic Compendium Author : GFA Systemtechnik GmbH Version : GFABasic.HYP v2.98 (12/31/2023) Subject : Documentation/Programming Nodes : 899 Index Size : 28056 HCP-Version : 3 Compiled on : Atari @charset : atarist @lang : @default : Document not found @help : Help @options : +g -i -s +z @width : 75 @hostname : STRNGSRV @hostname : CAB @hostname : HIGHWIRE @hostname : THING View Ref-FileFILESELECT [#title$,]path$,default$,name$ title$, path$, default$: sexp name$: svar This instruction causes a File Select box to be created on the screen, enabling the user-friendly selection of a file name. The expression 'title$' can be a maximum of 30 characters and allows a header to be placed in the File Select box - available from TOS 1.4 onwards. In the expression 'path$' the initial drive- and path-name should be specified. If no drive is specified, then the current drive is assumed. 'default$' contains the name of the file which will appear as the current choice. This can be selected by pressing Return, edited or deleted (by pressing ESCape). After exiting from the File Select box, the name of the selected file will be found in the string 'name$'. If the Cancel button was selected, then 'name$' will contain a null string (""). The format of path$, default$, and name$ conform to the conventions of the Hierarchical Filing system, described in 'Chapter 6 - Input and Output', section 'File Management'. See also FSEL_INPUT(). Example: DO FILESELECT "A:\*.PRG","GFABASIC.PRG",name$ IF name$="" PRINT "You clicked the Cancel button" ELSE IF RIGHT$(name$)="\" PRINT "You clicked the Ok button without naming a file" ELSE PRINT "You have selected the file ";name$ ENDIF LOOP --> A File Select box appears and responds to the choice made by the user. Note: The parameter 'title$' is optional and if left out the older File Select routine is called which does not allow a user-defined header. Memo: Avoid using the built in FILESELECT command as it only buffers older 32k ST video modes properly. If you want your application to function properly in all video modes call FSEL_INPUT() via the AES directly. Your program might receive an AES redraw message when calling FSEL_INPUT(). Does not handle long file names correctly. The path and file name are both forced to upper case. Paths over 150 characters will be truncated. File names over 12 characters will be ignored. Internal TOS v1.4 check is incorrect, it actually checks for v1.04. fsel_input()+, fsel_exinput()+