Initiates an Acquire operation (to get images from the currently open data source).
Synopsis
error = TwainAcquire(NumOfImages)
Args
NumOfImages is a count of how many images you're willing to accept from the data source, for example, 1 for only one image. If omitted, then this indicates that you're willing to accept as many images as the data source contains.
Returns
An empty string if the acquire operation is successfully started, or an error code not.
Notes
Typically the twain device will pop open a dialog allowing the user to choose various settings, such as color resolution, and cropping the image. To not show this dialog, then your script should call TwainsetOptions and not specify the 'UI' option. You typically will do this once at the start of your main script, after the data source manager is open.
TwainAcquire simply starts the acquire operation. Your script's message loop must check for twain signals (ie, GuiObject is set to TWAIN and GuiSignal is XFER) and followup with calls to TwainGetImage to actually get each image.
If TwainOpenDSM has not been previously called to open the Data Source Manager, then an error occurs. TwainQuery can be called to check whether the data source manager is open.
If TwainOpenSource is not called prior to TwainAcquire, then the default twain source is automatically opened. Otherwise, if you have previously called TwainOpenSource, then you can omit NumOfImages (since it was already set when you called TwainOpenSource).