![]() |
<< Index >> |
FutureBasic 5 |
FinderInfo | function | |
|
countVar = maxAcceptableentries
action = ¬
FinderInfo(countVar%, nameVar$, typeVar&, dirRefNumVar%)
countVar = 0
action = ¬
FinderInfo(countVar%, nameVar$, typeVar&, dirRefNumVar%)
countVar = negativeIndex
action = ¬
FinderInfo(countVar%, nameVar$, typeVar&, dirRefNumVar%)
countVar = maxAcceptableentries
action = ¬
FinderInfo(countVar%, @FSSpec[(array)],@OSType&[(array)], dirRefNumVar%)
fn ClearFinderInfo
FinderInfo
function to determine which document file(s) were involved, and whether they should be opened or printed.FinderInfo
once, soon after your program starts. You should also check during null events to see if additional files have been added to the list. This can take place when an _openDoc
event is sent from another application or when the user drags a file onto the icon of your running application.action
- The result of the FinderInfo
function is one of the following:action constant | Description |
_finderInfoOpen (0) | This file should be opened |
_finderInfoPrint (1) | This file should be printed |
_finderInfoErr (2) | An error occurred. One possible reason is that the program attempted to retrieve an indexed item that was out of range. |
countVar
- This variable is used to send a value to and receive a result from FinderInfo
countVar | Description |
< zero | An index into the list. The first item is -1, the next is -2, etc. |
zero | The return value will be placed in countVar. It will be the total number of items available. This is reset to zero when you call Fn ClearFinderInfo. |
> zero | In this case, countVar indicates the maximum number of entries that your program can accept. If you dimension an array to hold 10 elements, then the maximum would be 11 (10 + element zero). If you use 1, then the information can be placed in simple variables. |
FinderInfo
are used to both send and receive values. In order to send a value of "1" for the count, you must first set the variable, then check it on return.count% = 0
action = FinderInfo(count%,fName$,fType&,vRefNum%)
print "There are" count%" files in the queue."
nameVar$$ | This must be a "short string" simple variable or array element. If you specify a maximum greater than 1 in countVar%, then you must specify an array element in nameVar$, and the array must be dimensioned at exactly 31 characters per string. The names of the documents are returned into consecutive elements in the array, starting at the element you specify. If you specify 1 in countVar%, then you can use a simple string variable for nameVar$, dimensioned to at least 31 characters. The name of the document is returned in this variable. |
typeVar& | This must be a long integer simple variable or array element. If you specify a maximum greater than 1 in countVar%, then you must specify an array element in typeVar&. The 4-byte document type codes are returned into consecutive elements in the array, starting at the element you specify. If you specify 1 in countVar%, then you can use a simple long integer variable for typeVar&. The type code of the document is returned in this variable. |
dirRefNumVar% | This must be a short integer simple variable or array element. If you specify a maximum greater than 1 in countVar%, then you must specify an array element in dirRefNumVar%. The directory reference numbers for the documents are returned into consecutive elements in the array, starting at the element you specify. If you specify 1 in countVar%, then you can use a simple short integer variable for dirRefNumVar%. The directory reference number for the document is returned in this variable. A document's directory reference number indicates what directory the document is in. This will either be a volume reference number (in which case the document is in the volume's root directory), or a working directory reference number. |