![]() |
<< Index >> |
FutureBasic 5 |
on FinderInfo | statement | |
|
on FinderInfo {fn userFunction|gosub{lineNumber|"stmtLabel"}}
gFBFndrInfoCount |
The number of files pending in the queue. |
gFBInfoSpec(1024) as FSSpec |
An array of file spec records. There is one file spec record for each file that needs to be opened or printed. |
gFBInfoAction%(1024) |
A boolean value that is zero if the file is to be opened and non-zero if it is to be printed. |
/*
Build the application,
then drop a text file on to it
*/
local fn MyOpenFile ( fs as ^FSSpec )
print "FileName: ";fs.name
end fn
local fn MyFinderInfo
dim as FSSpec fs
dim as short @ count, action, j
dim as OSType @ fType
count = 0 // set to ask "How many?"
action = FinderInfo( count, fs, fType ) // FSSpec &
OSType
long if ( count > 0 ) // at least one file wants in
for j = 1 to count // process them all
count = -j
// FSSpec & OSType
action = FinderInfo( count, fs, fType )
if ( action == _finderInfoOpen ) and ¬
( fType == _"text" ) ¬
then fn MyOpenFile( fs )
next
fn ClearFinderInfo // in Subs Common.Incl
end if
end fn
on FinderInfo fn MyFinderInfo
menu 1,0,1, "File"
menu 1,1,1, "Quit/Q"
window 1
do
HandleEvents
until 0