Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Guides   Examples
New in version: 7.5   8.0   8.1   8.2   8.3   8.4   8.5   9.0   9.1   9.2    Statistic  


Sets the trigger to notify when new picture arrives.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
ImageCapture 6.5 Yes No No No No
MBS( "IKScannerDevicePanel.SetTrigger"; FileName; ScriptName )   More


Parameter Description Example value
FileName The name of the FileMaker File that contains the script. "test.fmp12"
ScriptName The name of the script to run. "MyScript"


Returns OK or error.


Sets the trigger to notify when new picture arrives.
You get a call for each picture as user may import several.
The parameter to your script is the native file path to the image file.

Either you use the trigger and process each image there or you can call later IKScannerDevicePanel.ImageCount and IKScannerDevicePanel.NextImage to get the images.

This function requires a native path. Use Path.FileMakerPathToNativePath to convert a FileMaker path to a native path if required. If you like to have the user choose the path, you can use FileDialog functions.


Set trigger script:

Set Variable [$r; Value:MBS( "IKScannerDevicePanel.SetTrigger"; Get(FileName); "Scanner Dialog Trigger" )]

Import image in triggered script:

Set Variable [$Path; Value:Get(ScriptParameter)]
Set Variable [$Image; Value:MBS("Container.ReadFile"; $path)]
If [MBS("ISError") = 0]
    New Record/Request
    Set Field [ImageCapture Dialogs::Image; $Image]
    Commit Records/Requests [No dialog]
End If

Clear trigger script:

Set Variable [$r; Value:MBS( "IKScannerDevicePanel.SetTrigger"; ""; "" )]

See also

Example Databases

Created 7th November 2016, last changed 24th February 2018

IKScannerDevicePanel.SetScannerDeviceName   -   IKScannerDevicePanel.SetWidth

Feedback: Report problem or ask question.

MBS Xojo Plugins