Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
ImageCapture.OpenDevice
Requests to open a session on the device.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
ImageCapture | 6.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | ❌ No |
MBS( "ImageCapture.OpenDevice"; Device { ; Wait } ) More
Parameters
Parameter | Description | Example | Flags |
---|---|---|---|
Device | The device ID. Can be zero based index in device list. Or UUID, Name or persistent ID string. |
0 | |
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 to open a session on the device.A client MUST open a session on a device in order to use the device.
If needed closes current device to open new device.
Added 20 seconds timeout for version 8.1.
With ImageCapture.DeviceInfo you can query hasOpenSession later to verify you have a session open.
Examples
Open device:
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 []
End If
See also
- ImageCapture.CloseDevice
- ImageCapture.DeviceInfo
- ImageCapture.Devices
- ImageCapture.RequestScan
- ImageCapture.RequestSelectFunctionalUnit
- IsError
- Text.RemovePrefix
Release notes
- Version 8.4
- Changed ImageCapture.OpenDevice and ImageCapture.CloseDevice to only request closing of the current session, if there is one open to avoid freeze.
- Version 8.3
- Added wait parameter for ImageCapture.CloseDevice, ImageCapture.OpenDevice, ImageCapture.RequestDeleteFiles, ImageCapture.requestOverviewScan, ImageCapture.requestScan and ImageCapture.requestSelectFunctionalUnit functions.
- Changed ImageCapture.OpenDevice to wait for ready signal of device, so your scripts do not continue before we know all details of device.
- Version 8.1
- Added timeout for ImageCapture.OpenDevice in case no answer comes from driver.
Example Databases
Blog Entries
- Import images from cameras on MacOS with FileMaker
- MBS FileMaker Plugin, version 8.4pr6
- MBS FileMaker Plugin, version 8.3pr3
- MBS FileMaker Plugin, version 8.3pr2
- MBS FileMaker Plugin v8.1 with 5100 Functions In One Plugin
- MBS FileMaker Plugin 8.1
- MBS FileMaker Plugin, version 8.1pr4
FileMaker Magazin
This function checks for a license.
Created 11st September 2016, last changed 18th April 2024