iOSApp.SetOrientationDidChangeScript
------------------------------------

Sets the script to be run when device is rotated.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [iOSApp](component_iOSApp.md) | [13.4](newinversion134.md) | ❌ No | ❌ No | ❌ No | ❌ No | ✅ Yes |

MBS( "iOSApp.SetOrientationDidChangeScript"; FileName; ScriptName { ; Parameter } ) 

**MBS**( **"iOSApp.SetOrientationDidChangeScript"** /\* Sets the script to be run when device is rotated. \*/  
**$FileName**; /\* The database file name where the script is located. e.g. "test.fmp12" \*/   
**$ScriptName**; /\* The script name. e.g. "MyScript" \*/   
**$Parameter**) /\* Optional; The script parameter. \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| FileName | The database file name where the script is located. | "test.fmp12" |  |
| ScriptName | The script name. | "MyScript" |  |
| Parameter | The script parameter. |  | Optional |

### Result

Returns OK or error.

### Description

Sets the script to be run when device is rotated.  
  
  
With plugin version 6.0 or newer the script name can be a script ID number. In that case the plugin queries the script name for the given script ID. This allows to call scripts by ID and avoid problems if scripts are later renamed.  
  
Notice: FileMaker 19.2 adds a fmplugin extended privileges. If you have such an extended privileges to allow the plugin to trigger scripts, you need to grant permissions for it. If such a privilege is not defined, the plugin is allowed to trigger scripts. See FileMaker product documentation for details.  
### Examples

Set trigger:

 Set Variable \[ $r ; Value: MBS ("iOSApp.SetOrientationDidChangeScript"; Get(FileName); "OrientationDidChangeScript") \]  
### See also

- [iOSApp.GetOrientationDidChangeEvaluate](iOSAppGetOrientationDidChangeEvaluate.md)
- [iOSApp.GetOrientationDidChangeScript](iOSAppGetOrientationDidChangeScript.md)
- [iOSApp.SetOrientationDidChangeEvaluate](iOSAppSetOrientationDidChangeEvaluate.md)

### Release notes

- **Version 13.4**
    - Added [iOSApp.GetOrientationDidChangeEvaluate](https://www.mbsplugins.eu/iOSAppGetOrientationDidChangeEvaluate.shtml), [iOSApp.GetOrientationDidChangeScript](https://www.mbsplugins.eu/iOSAppGetOrientationDidChangeScript.shtml), [iOSApp.SetOrientationDidChangeEvaluate](https://www.mbsplugins.eu/iOSAppSetOrientationDidChangeEvaluate.shtml) and [iOSApp.SetOrientationDidChangeScript](https://www.mbsplugins.eu/iOSAppSetOrientationDidChangeScript.shtml) functions.

### Blog Entries

- [News in MBS FileMaker Plugin 13.4](https://www.mbsplugins.de/archive/2023-09-20/News_in_MBS_FileMaker_Plugin_1/monkeybreadsoftware_blog_filemaker)
- [Neues MBS Plugin 13.4 für Claris FileMaker](https://www.mbsplugins.de/archive/2023-09-12/Neues_MBS_Plugin_134_für_Clar/monkeybreadsoftware_blog_filemaker)
- [MBS Plugin 13.4 for Claris FileMaker - More than 7100 Functions In One Plugin](https://www.mbsplugins.de/archive/2023-09-12/MBS_Plugin_134_for_Claris_File/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 13.4pr1](https://www.mbsplugins.de/archive/2023-08-01/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 19th July 2023 , last changed 19th July 2023

  
[iOSApp.SetOrientationDidChangeEvaluate](iOSAppSetOrientationDidChangeEvaluate.md) - [iOSApp.SetSignificantTimeChangeEvaluate](iOSAppSetSignificantTimeChangeEvaluate.md)

[HTML Version](iOSAppSetOrientationDidChangeScript.shtml)