Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
ImageCapture.Devices
Queries list of devices.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
ImageCapture | 6.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | ❌ No |
Parameters
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 |
Result
Returns UUIDs or error.
Description
Queries list of devices.Returns a list of UUIDs for devices.
Please pass the UUIDs to the ImageCapture.DeviceInfo function to query details.
Before calling this function, make sure you called ImageCapture.Initialize once, best in your start script.
Version 10.0 or later filters duplicates away.
Examples
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
See also
- ImageCapture.DeviceInfo
- ImageCapture.DevicesJSON
- ImageCapture.Features
- ImageCapture.Initialize
- ImageCapture.OpenDevice
Release notes
- Version 10.0
- Changed ImageCapture.Devices to filter duplicates.
- Version 8.4
- Added alternateNames entry to ImageCapture.DevicesJSON to list alternate names we found.
- Version 8.3
- Added ImageCapture.DevicesJSON function.
Example Databases
Blog Entries
FileMaker Magazin
This function checks for a license.
Created 11st September 2016, last changed 14th June 2022