Topics
All
MacOS
(Only)
Windows
(Only)
Linux
(Only, Not)
iOS
(Only, Not)
Components
Crossplatform Mac & Win
Server
Client
Old
Deprecated
Guides
Examples
Videos
New in version:
9.3
9.4
9.5
10.0
10.1
10.2
10.3
10.4
10.5
10.6
Statistic
FMM
Blog
ImageCapture.RequestSelectFunctionalUnit
Requests the scanner device to select a functional unit.
| Component | Version | macOS | Windows | Linux | Server | FileMaker 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?"; 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
Blog Entries
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.
Created 11st September 2016, last changed 19th November 2018
ImageCapture.RequestScan - ImageCapture.RequestSyncClock
Feedback: Report problem or ask question.
Links
MBS FileMaker blog