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:
12.1
12.2
12.3
12.4
12.5
13.0
13.1
13.2
13.3
13.4
Statistic
FMM
Blog
Queries list of devices.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
ImageCapture | 6.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | ❌ No |
Parameter | Description | Example | Flags |
---|---|---|---|
Filter | Available in MBS FileMaker Plugin 8.3 or newer. You can filter devices by passing criteria here. The filter string can contain camera, scanner, local, remote, bonjour, bluetooth or shared to only show those devices. |
"Camera, local" | Optional |
Returns UUIDs or error.
List devices:
Set Variable [$Devices; Value:MBS("ImageCapture.Devices")]
#loop over entries
Set Variable [$Count; Value:ValueCount($Devices)]
If [$Count > 0]
Set Variable [$Index; Value:1]
Loop
#Check Device
Set Variable [$ID; Value:GetValue($Devices; $index)]
New Record/Request
Set Field [Devices::Name; MBS("ImageCapture.DeviceInfo"; $ID; "name")]
Set Field [Devices::ID; $ID]
Set Field [Devices::Remote; Let ( [ r = MBS("ImageCapture.DeviceInfo"; $ID; "remote") ]; If(r = 1; "yes"; "no") )]
Set Field [Devices::Shared; Let ( [ r = MBS("ImageCapture.DeviceInfo"; $ID; "shared") ]; If(r = 1; "yes"; "no") )]
Set Field [Devices::transportType; MBS("ImageCapture.DeviceInfo"; $ID; "transportType")]
Set Field [Devices::serialNumberString; MBS("ImageCapture.DeviceInfo"; $ID; "serialNumberString")]
Set Field [Devices::locationDescription; MBS("ImageCapture.DeviceInfo"; $ID; "locationDescription")]
Set Field [Devices::persistentIDString; MBS("ImageCapture.DeviceInfo"; $ID; "persistentIDString")]
Set Field [Devices::icon; MBS("ImageCapture.DeviceInfo"; $ID; "icon")]
Set Field [Devices::capabilities; MBS("ImageCapture.DeviceInfo"; $ID; "capabilities")]
Commit Records/Requests [No dialog]
#next
Set Variable [$Index; Value:$index + 1]
Exit Loop If [$index > $Count]
End Loop
End If
Query devices and names:
While(
[
names = "";
// query list of devices
list = MBS( "ImageCapture.Devices" );
count = ValueCount(list);
index = 1
] ;
index ≤ count ;
[
id = GetValue(list; index);
// query name for each device
name = MBS( "ImageCapture.DeviceInfo"; id; "name" );
names = names & id & " -> " & name & ¶;
index = index + 1
] ;
// return all the names
names )
Example result:
564E4336-4833-3130-1234-B05CDAC2071A -> Laserdrucker
CFE92100-67C4-11D4-1234-F8D027D15ACE -> EPSON ET-7700 Series
This function checks for a license.
Created 11st September 2016, last changed 14th June 2022