IKScannerDevicePanel.SetCloseTrigger
------------------------------------

Sets a close trigger.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [ImageCapture](component_ImageCapture.md) | [8.1](newinversion81.md) | ✅ Yes | ❌ No | ❌ No | ❌ No | ❌ No |

MBS( "IKScannerDevicePanel.SetCloseTrigger"; FileName; ScriptName { ; Parameter } ) 

**MBS**( **"IKScannerDevicePanel.SetCloseTrigger";** /\* Sets a close trigger. \*/  
**$FileName**; /\* The name of the FileMaker File that contains the script.e.g. "test.fmp12" \*/   
**$ScriptName**; /\* The name of the script to run.e.g. "MyScript" \*/   
**$Parameter**) /\* Optional; The optional script parameter. \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| FileName | The name of the FileMaker File that contains the script. | "test.fmp12" |  |
| ScriptName | The name of the script to run. | "MyScript" |  |
| Parameter | The optional script parameter. |  | Optional |

### Result

Returns OK or error.

### Description

Sets a close trigger.  
This script will be called whenever the panel closes.  
Either by code or by user clicking close button.  
If the normal trigger run and you delayed work on the files, you can process them now.  
### Examples

Set close trigger script:

 Set Variable \[$r ; Value:MBS ( "IKScannerDevicePanel.SetCloseTrigger"; Get(FileName); "Scanner Dialog Close Trigger" )\]  
Clear close trigger script:

 Set Variable \[$r ; Value:MBS ( "IKScannerDevicePanel.SetCloseTrigger"; ""; "" )\]  
### See also

- [IKScannerDevicePanel.GetCombine](IKScannerDevicePanelGetCombine.md)
- [IKScannerDevicePanel.SetCombine](IKScannerDevicePanelSetCombine.md)
- [IKScannerDevicePanel.SetTrigger](IKScannerDevicePanelSetTrigger.md)
- [IKScannerDevicePanel.SetWindowTitle](IKScannerDevicePanelSetWindowTitle.md)

### Release notes

- **Version 8.1**
    - Added [IKScannerDevicePanel.SetCloseTrigger](http://www.mbsplugins.eu/IKScannerDevicePanelSetCloseTrigger.shtml) function.

### Blog Entries

- [MBS FileMaker Plugin, version 8.1pr5](https://www.mbsplugins.de/archive/2018-02-26/MBS_FileMaker_Plugin_version_8/monkeybreadsoftware_blog_filemaker)

This function is free to use.

Created 24th February 2018 , last changed 26th February 2018

  
[IKScannerDevicePanel.Reset](IKScannerDevicePanelReset.md) - [IKScannerDevicePanel.SetCombine](IKScannerDevicePanelSetCombine.md)

[HTML Version](IKScannerDevicePanelSetCloseTrigger.shtml)