How can I select a specific device without the source selection dialog?

You can use Dynamic Web TWAIN's SelectSourceByIndex method to select a specific source as the current source.

Javascript Code:

var i;
for (i= 0; i< DWObject.SourceCount;i++){ 
    if (DWObject.GetSourceNameItems(i)=="Specified device name" )
        DWObject.SelectSourceByIndex (i); //select the specific source
        //if can't find the specified source, it'll select default source
Is this page helpful?

Leave a Reply

Your email address will not be published.