Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Guides   Examples
New in version: 7.2   7.3   7.4   7.5   8.0   8.1   8.2   8.3   8.4   8.5    Statistic  

ImageCapture.requestSelectFunctionalUnit

Requests the scanner device to select a functional unit.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
ImageCapture 6.4 Yes No No No No

MBS( "ImageCapture.requestSelectFunctionalUnit"; Unit { ; Wait } )

Parameters

Parameter Description Example value
Unit The functional unit to request.
Can be Flatbed, PositiveTransparency, NegativeTransparency or DocumentFeeder.
"Flatbed"
Wait Optional
Pass 1 to wait till complete.
Or pass 0 to return immediately.
Default is 1 to wait.
0

Result

Returns OK or error.

Description

Requests the scanner device to select a functional unit.

Examples

Request flatbed unit:

Set Variable [$r; Value:MBS("ImageCapture.requestSelectFunctionalUnit"; "Flatbed")]
If [MBS("iserror")]
    Show Custom Dialog ["Failed to get flatbed?"; MBS("Text.RemovePrefix"; $r; "[MBS] ")]
    Exit Script []
End If

Request document feeder:

MBS("ImageCapture.requestSelectFunctionalUnit"; "DocumentFeeder")

Open device and request document feeder:

Set Variable [ $r ; Value: MBS("ImageCapture.OpenDevice"; Images::Device) ]
If [ MBS("iserror") ]
    Show Custom Dialog [ "Failed to open" ; MBS("Text.RemovePrefix"; $r; "[MBS] ") ]
    Exit Script [ Text Result: ]
End If
Pause/Resume Script [ Duration (seconds): ,1 ]
Set Variable [ $r ; Value: MBS("ImageCapture.GetParameter"; "availableFunctionalUnitTypes") ]
If [ Length ( $r ) > 0 ]
    # if we have more than one, pick one
    Set Variable [ $r ; Value: MBS("ImageCapture.requestSelectFunctionalUnit"; "DocumentFeeder") ]
    If [ MBS("iserror") ]
        Show Custom Dialog [ "Failed to get flatbed?" ; MBS("Text.RemovePrefix"; $r; "[MBS] ") ]
        Exit Script [ Text Result: ]
    End If
End If

See also

Example Databases

Created 11st September 2016, last changed 20th June 2018


ImageCapture.requestScan   -   ImagePicker.AvailableCaptureModesForCameraDevice

Feedback: Report problem or ask question.




Links
MBS FileMaker Plugins