NetSearcher's script present itself as a looped call of the functions WaitSearchEvent
until it returns 0 or -1:
function WaitSearchEvent(var fname: string; var sz: integer; var flg:integer;
var findtime: TDateTime; var seentime: TDateTime):
integer;
Return
fname - file path\name,
sz - file size or -1 if fname is directory
flg - bitmask parameter. If bit 0 is set then file was found at last search
scan, if bit 1 is set then file is highlighted as new.
findtime - when file was find
first time,
seentime - when file was accessible on network last time.
Function results:
1 - on found file
0 - when search completed normally
-1 - when search completed by pressing Stop button. In this case script will not
be notified about early found files
Search will be completed
only when script finished its execution.
Additionally script can get Seracher's active preset name by calling function:
function PresetName:string;
|