I have noticed that several posts regarding TWAIN devices are lef (partially) unanswered, so here is my contribution. The purpose is only to give an example, so there is much room for improvement. First of all get eztw32.dll (www.dosadi.com). Put it in the directory of the script. Run the script. The script will: check for the presence of the dllcheck for the availability of TWAINlets you select a devicelets you acquire an image to a fileThere are many other features in the dll not used (like raw data handling). See the information that comes with the dll. I ran the script on WIN2K with an HP ScanJet 3400C. This will probably also answer (part of) following topics: topic 48948 topic 23463 topic 27503 CODE;Include constants#include <GUIConstants.au3> #include <GuiEdit.au3> ;Initialize variables Global $GUIWidth Global $GUIHeight $GUIWidth = 290 $GUIHeight = 250 ;Create window $hwnd = GUICreate("TWAINtest", $GUIWidth, $GUIHeight) ;Create a form with buttons $button1 = GUICtrlCreateButton("check", 10, 20, 60, 25) $button2 = GUICtrlCreateButton("select", 10, 60, 60, 25) $button3 = GUICtrlCreateButton("acquire", 10, 100, 60, 25) ;...and with labels to display messages $edit1 = GUICtrlCreateLabel("", 80, 25, 200, 25) $edit2 = GUICtrlCreateLabel("", 80, 45, 200, 25) $edit3 = GUICtrlCreateLabel("", 80, 65, 200, 25) $edit4 = GUICtrlCreateLabel("", 80, 105, 200, 25) ;Disable buttons GUICtrlSetState($button2, $GUI_DISABLE) GUICtrlSetState($button3, $GUI_DISABLE) ;Show window/Make the window visible GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ;Destroy the GUI including the controls GUIDelete() ;Exit the script Exit Case $msg = $button1 ;Get the DLL version (211 means 2.11, so divide by 100) $rc = DllCall('EZTW32.DLL','long','TWAIN_EasyVersion') ;@error returns error from DllCall function if @error <> 0 then _GUICtrlEdit_SetText($edit1,'eztw32.dll load error') else _GUICtrlEdit_SetText($edit1,'eztw32.dll version: ' & $rc[0]/100) $rc = DllCall("eztw32.dll","long","TWAIN_IsAvailable") _GUICtrlEdit_SetText($edit2,'TWAIN available: RC = ' & $rc[0]) if $rc[0] <> 0 then GUICtrlSetState($button2, $GUI_ENABLE) endif endif Case $msg = $button2 ;Select image source ;A new window is openened and the select source manageris displayed ;All available TWAIN devices should be in the list $rc = DllCall("eztw32.dll","long","TWAIN_SelectImageSource",'hwnd',$hwnd) if $rc[0] <> 0 then GUICtrlSetState($button3, $GUI_ENABLE) _GUICtrlEdit_SetText($edit3,'TWAIN device selected') else _GUICtrlEdit_SetText($edit3,'no TWAIN device selected') endif Case $msg = $button3 ;Acquire image to a file $rc = DllCall("eztw32.dll","long","TWAIN_AcquireToFilename","hwnd",$hwnd,"str","") _GUICtrlEdit_SetText($edit4,'RC = ' & $rc[0]) EndSelect WEnd