Dialog.SetTimeout
-----------------

Sets a timeout for the dialog in seconds.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Dialog](component_Dialog.md) | [5.2](newinversion52.md) | ✅ Yes | ✅ Yes | ❌ No | ❌ No | ❌ No |

MBS( "Dialog.SetTimeout"; Value ) 

**MBS**( **"Dialog.SetTimeout";** /\* Sets a timeout for the dialog in seconds. \*/  
**$Value**) /\* The new timeout value in seconds.e.g. 30 \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| Value | The new timeout value in seconds. | 30 |

### Result

Returns OK or error.

### Description

Sets a timeout for the dialog in seconds.  
If a timeout is set the plugin will run a timer to close the window after a given time period.  
The result of the dialog will be "Timeout" and your scripts can continue.  
### Examples

Run a dialog with timeout:

 Set Variable \[$r ; Value:MBS ("[Dialog.Reset](DialogReset.md)")\]  
Set Variable \[$r ; Value:MBS ("[Dialog.SetIcon](DialogSetIcon.md)"; Dialog::Icon )\]  
Set Variable \[$r ; Value:MBS ("[Dialog.SetInformativeText](DialogSetInformativeText.md)"; Dialog::InformativeText )\]  
Set Variable \[$r ; Value:MBS ("[Dialog.SetMessage](DialogSetMessage.md)"; Dialog::Message )\]  
Set Variable \[$r ; Value:MBS ("[Dialog.SetMode](DialogSetMode.md)"; "Warning")\]  
Set Variable \[$r ; Value:MBS ("[Dialog.SetWindowTitle](DialogSetWindowTitle.md)"; Dialog::WindowTitle )\]  
Set Variable \[$r ; Value:MBS ("Dialog.SetTimeout"; 20)\]  
Set Variable \[$result ; Value:MBS ("[Dialog.Run](DialogRun.md)")\]  
Set Field \[Dialog::Result ; $result \]  
### See also

- [Dialog.GetTimeout](DialogGetTimeout.md)
- [Dialog.Reset](DialogReset.md)
- [Dialog.Run](DialogRun.md)
- [Dialog.SetIcon](DialogSetIcon.md)
- [Dialog.SetInformativeText](DialogSetInformativeText.md)
- [Dialog.SetMessage](DialogSetMessage.md)
- [Dialog.SetMode](DialogSetMode.md)
- [Dialog.SetWindowTitle](DialogSetWindowTitle.md)

### Release notes

- **Version 13.4**
    - Fixed a problem with [Dialog.SetTimeout](https://www.mbsplugins.eu/DialogSetTimeout.shtml) closing a FileMaker custom dialog by accident on macOS.

### Example Databases

- [Utility functions/Idle](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Utility%20functions/Idle.shtml#3ScriptAnchor_)

### Blog Entries

- [MBS FileMaker Plugin, version 13.4pr6](https://www.mbsplugins.de/archive/2023-09-01/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin 6.2 for OS X/Windows](https://www.mbsplugins.de/archive/2016-05-24/MBS_FileMaker_Plugin_62_for_OS/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 5.2pr3](https://www.mbsplugins.de/archive/2015-06-13/MBS_FileMaker_Plugin_version_5/monkeybreadsoftware_blog_filemaker)

This function is free to use.

Created 11st June 2015 , last changed 30th July 2025

  
[Dialog.SetTextAlignment](DialogSetTextAlignment.md) - [Dialog.SetTitleIcon](DialogSetTitleIcon.md)

[HTML Version](DialogSetTimeout.shtml)