EZTwainX InstalledSources Property
This read-only property returns a list of all the installed TWAIN devices, in the form of a collection of strings. Note that traditional TWAIN devices will appear in the list if their driver is installed on the system, whether or not the physical device is connected or turned on. On WinME, WinXP, and later platforms, WIA devices will appear in the list prefixed with "WIA-", but only if they are connected and active.
Here are some examples of loading the list of installed sources into a combo box or select element.
VBscript
devs = EZTwain.InstalledSources For Each s In devs DevList.AddItem(s) Next s DevList.Text = EZTwain.DefaultSourceDevice // select default device
Javascript
var devlist = document.getElementById('devlist'); // get list of installed sources, convert from VB array to Javascript array: var devs = new VBArray(Eztwain.InstalledSources).toArray(); var defdev = Eztwain.DefaultSourceDevice; devlist.length = 0; for (var i = 0; i < devs.length; i++) { var elt=document.createElement('option'); elt.text=devs[i]; devlist.add(elt); if (elt.text==defdev) { devlist.selectedIndex = devlist.length-1; } } // for