Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
ImageCapture.RequestSelectFunctionalUnit
Requests the scanner device to select a functional unit.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
ImageCapture | 6.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | ❌ No |
Parameters
Parameter | Description | Example | Flags |
---|---|---|---|
Unit | The functional unit to request. Can be Flatbed, PositiveTransparency, NegativeTransparency or DocumentFeeder. |
"Flatbed" | |
Wait | Pass 1 to wait till complete. Or pass 0 to return immediately. Default is 1 to wait. |
0 | Optional |
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?"; $r]
Exit Script []
End If
Request document feeder:
Set Variable [$r; Value:MBS("ImageCapture.requestSelectFunctionalUnit"; "DocumentFeeder")]
If [MBS("isError")]
Show Custom Dialog ["Failed to get flatbed?"; $r]
Exit Script []
End If
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
Release notes
- Version 8.5
- Changed ImageCapture.RequestSelectFunctionalUnit to return error directly if you request an unavailable functional unit.
- Improved ImageCapture.RequestSelectFunctionalUnit to better track which unit is selected and skip the request if the device is already selected.
- Version 8.3
- Added wait parameter for ImageCapture.CloseDevice, ImageCapture.OpenDevice, ImageCapture.RequestDeleteFiles, ImageCapture.requestOverviewScan, ImageCapture.requestScan and ImageCapture.requestSelectFunctionalUnit functions.
Blog Entries
FileMaker Magazin
Created 11st September 2016, last changed 10th October 2023
