cancel
Showing results for 
Search instead for 
Did you mean: 

Scan Queue - Process Input File List

Not applicable

Does anyone have any documentation on this vbscript hook?  Or even a sample script?

2 REPLIES 2

Steve_Reed
Employee
Employee

Sherri,

This script hook is used to control/modify the list of files that will be swept or scanned from disk (Kofax).  It is triggered when the client has built its list of the files to swept/scanned from disk but not yet started the operation.  The script will receive the list of filenames in an array, and then can perform whatever logic it needs to on the list: adding, removing, modifying the files.  When the script exits, the client will use the updated file list to perform the actual sweep or scan from disk.  Here is an example of getting the file list and adding a new file to it:

Sub Main35

     dim obapp

     set obapp = CreateObject ("onbase.application")

     dim scanfiles

     set scanfiles = obapp.ScanFileList

     MsgBox "The current scan queue is " & scanfiles.ScanQueueName & " " & scanfiles.ScanQueueID & " the current context is " & scanfiles.Context & " and there are " & scanfiles.Count & " files in the list to be processed"

     scanfiles.AddItem "c:\mynewfile.tif"

     MsgBox "Now there are " & scanfiles.Count & " files in the list because we just added one"

     set scanfiles = Nothing

     set obapp = Nothing

End Sub

 

 

 

Steve_Reed
Employee
Employee

The other methods on the scanfiles object that I didn't mention above are:

GetItemAt (int position) - returns the filename at position in the list, position is from 0 to count - 1

SetItemAt (int position, BSTR file) - sets the item at position to the new file

DeleteItemAt (int position) - removes the file at position

RemoveAll() - empties the entire file list