freqlib
FileRequest$ opens Blitz Basic 2’s own file requester on the used
screen and waits until the user picks a file or cancels. The asllib
library gives the system’s requester instead.
MaxLen path$=160
MaxLen fname$=64
f$=FileRequest$("Load picture",path$,fname$)
If f$<>"" Then LoadBitMap 0,f$path$ and fname$ must be string variables with a MaxLen of at
least 160 and 64; they give the drawer and the name to start with and
get the ones chosen, so that the next call starts there again. After
OK the requester also remembers its position and size.
Based on the freqlib guide by Acid Software.
Library number 152.
Commands
FileRequest$
Opens the file requester with the title Title$ and returns the full name of the file chosen, the drawer and the name joined with a / where needed, or an empty string if the user cancels.
Function, result $. Help text: Title$,Pathname$,Filename$
Arguments: $, &$, &$
The user picks a file with OK, a double click or Return in the file name. The buttons of the requester show the drives and assigns, go to the parent drawer and make the drawer shown the current directory; when the program ends, the directory it was started in is current again.
A file name has room for 63 characters and a path for 159, and for no
more than the MaxLen of Filename$ and Pathname$. The requester
refuses a longer name or path, picked in the list or found with
PARENT or CD: it stays open, keeps its fields, and shows “Name too
long” or “Path too long” in the title bar of the screen
(#1042).