Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server (Not)   Client   Old   Guides   Examples
New in version: 6.0   6.1   6.2   6.3   6.4   6.5   7.0   7.1   7.2   7.3    Statistic  

WIA.DevicePropertyValue

Queries a device property value.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
WIA 6.5 No Yes No No No

MBS( "WIA.DevicePropertyValue"; Device; Key )

Parameters

Parameter Description Example value
Device You can pass index of device to check them in a row.
Or pass name or unique ID of device.
Pass empty string for current device.
$index
Key The property key.
Can be a text with the name of the property or the corresponding ID.
"Name"

Result

Returns value or error.

Description

Queries a device property value.
You can use WIA.DevicePropertyKeys to learn about available keys.
Values are returned as numbers, booleans or converted to text.

Examples

Query name of current device:

MBS( "WIA.DevicePropertyValue"; ""; "Name" )

List properties:

Set Variable [$device; Value:Get(ScriptParameter)]
Set Variable [$list; Value:MBS("WIA.DevicePropertyKeys"; $device)]
If [MBS("IsError")]
    Show Custom Dialog ["Error"; $list]
Else
    Set Variable [$count; Value:ValueCount ( $list )]
    If [$count > 0]
        Set Variable [$i; Value:1]
        Loop
            Set Variable [$key; Value:GetValue ( $list; $i)]
            Set Variable [$value; Value:MBS("WIA.DevicePropertyValue"; $device; $key)]
            New Record/Request
            Set Field [WIA Scan::Device; $device]
            Set Field [WIA Scan::Key; $key]
            Set Field [WIA Scan::Value; $value]
            Commit Records/Requests [No dialog]
            #Next
            Set Variable [$i; Value:$i+1]
            Exit Loop If [$i > $count]
        End Loop
    End If
End If

Query maximum vertical optical resolution:

// via name
MBS("WIA.DevicePropertyValue"; ""; "Vertical Optical Resolution")
// via ID
MBS("WIA.DevicePropertyValue"; ""; 3091)

See also

Example Databases


WIA.DevicePropertyKeys   -   WIA.GetCurrentDevice

Feedback: Report problem or ask question.




Links
MBS Xojo Plugins