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-FileFSEL_INPUT(path$,name$[,button]) path$, name$: svar button: ivar This function invokes the standard File Selector Box, and corresponds to the FILESELECT instruction. The initial directory path and the default file name are contained in the string variables path$ and name$. After the file selector box has been used in the normal way, and the function exited by clicking on 'Ok' or 'Cancel', these strings contain the last used directory path and chosen file name respectively. The optional integer variable 'button' contains 1 or 0, depending on whether the 'Ok' or 'Cancel' button was clicked. Returns 0 if an error occured or 1 otherwise. On entry: path$ - Initial directory path. name$ - Default file name. On exit: path$ - Final directory path. name$ - Chosen file. button - Returns the button clicked: 0: 'Cancel' was clicked. 1: 'Ok' was clicked. The parameter button is optional, this value can also be found by querying GINTOUT(1). Example: p$="a:\*.*" n$="" DO ~FSEL_INPUT(p$,n$,b) CLS PRINT p$ PRINT n$ PRINT b LOOP UNTIL b=0 --> Various file names can be selected and displayed. The program finishes when the 'Cancel' button is clicked. Memo: Does not handle long file names correctly. Paths over 100 characters will be truncated. File names over 50 characters will be truncated. A bug in the editor causes path$ to be +1 longer than it should be. A hidden trailing null is left on the end of the string. fsel_input()+