Component: WindowsScript 
-------------------------

Run Windows Scripts.

Microsoft did not port the ScriptControl to 64-bit, so the official control coming with Windows, is only for 32-bit.  
  
Alternative, you can install Tablacus Script Control 64 to get it working in 64-bit.  
http://www.eonet.ne.jp/~gakana/tablacus/scriptcontrol\_en.html

| Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|
| [1.1](newinversion11.md "First functions introduced with version 1.1.") | ❌ No | ✅ Yes | ❌ No | ✅ Yes, on Windows | ❌ No |

  
| Item | Details |
|:--|:--|
| [WindowsScript.AddCode](WindowsScriptAddCode.md)   Adds the code to the specified script. | Win only   1.1 |
| [WindowsScript.Close](WindowsScriptClose.md)   Removes the specified script from memory. | Win only   1.1 |
| [WindowsScript.Create](WindowsScriptCreate.md)   Creates a Windows Script in memory. | Win only   1.1 |
| [WindowsScript.ErrorClear](WindowsScriptErrorClear.md)   Clears the old errors | Win only   1.1 |
| [WindowsScript.ErrorColumn](WindowsScriptErrorColumn.md)   Returns the error column of the last error. | Win only   1.1 |
| [WindowsScript.ErrorDescription](WindowsScriptErrorDescription.md)   Returns the text description of the error. | Win only   1.1 |
| [WindowsScript.ErrorLine](WindowsScriptErrorLine.md)   Returns the error line of the last error. | Win only   1.1 |
| [WindowsScript.ErrorNumber](WindowsScriptErrorNumber.md)   Returns the number of the last error in a VB script. | Win only   1.1 |
| [WindowsScript.ErrorSource](WindowsScriptErrorSource.md)   This function returns the name of the module that had the error. | Win only   1.1 |
| [WindowsScript.ErrorText](WindowsScriptErrorText.md)   Returns the Line of the Script that contains the error. | Win only   1.1 |
| [WindowsScript.Eval](WindowsScriptEval.md)   Evaluates the "text" and returns the result. | Win only   1.1 |
| [WindowsScript.ExecuteFunction](WindowsScriptExecuteFunction.md)   Runs the script specified by the Script ID. | Win only   1.1 |
| [WindowsScript.ExecuteStatement](WindowsScriptExecuteStatement.md)   Executes a statement. | Win only   1.1 |
| [WindowsScript.GetAllowUI](WindowsScriptGetAllowUI.md)   Returns the Allow UI State of the specified script. | Win only   1.1 |
| [WindowsScript.GetLanguage](WindowsScriptGetLanguage.md)   Queries the current language. | Win only   1.1 |
| [WindowsScript.GetTimeout](WindowsScriptGetTimeout.md)   Each script has a setting that dictates how long a script will wait before timing out. | Win only   1.1 |
| [WindowsScript.GetUseSafeSubset](WindowsScriptGetUseSafeSubset.md)   Returns the Safe Subset State of the specified script. | Win only   1.1 |
| [WindowsScript.SetAllowUI](WindowsScriptSetAllowUI.md)   Sets the "Allow UI State of the specified script. | Win only   1.1 |
| [WindowsScript.SetLanguage](WindowsScriptSetLanguage.md)   Returns the Line of the Script that contains the error. | Win only   1.1 |
| [WindowsScript.SetTimeout](WindowsScriptSetTimeout.md)   Each script has a setting that dictates how long a script will wait before timing out. | Win only   1.1 |
| [WindowsScript.SetUseSafeSubset](WindowsScriptSetUseSafeSubset.md)   Sets the Safe Subset State of the specified script. | Win only   1.1 |

21 functions shown.

### Blog Entries

- [4000 functions in 10 years](https://www.mbsplugins.de/archive/2016-06-11/4000_functions_in_10_years/monkeybreadsoftware_blog_filemaker)
- [MBS Filemaker Plugin Overview](https://www.mbsplugins.de/archive/2011-04-14/MBS_Filemaker_Plugin_Overview/monkeybreadsoftware_blog_filemaker)

### Example Databases

- [OS Scripting/Trigger Scripts Using OS Scripting](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/OS%20Scripting/Trigger%20Scripts%20Using%20OS%20Scripting.shtml#1292FieldAnchor_)
- [OS Scripting/VBScript Example](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/OS%20Scripting/VBScript%20Example.shtml#12ScriptAnchor_)
- [Window/WindowEffects](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Window/WindowEffects.shtml#1CustomFunctionAnchor_)

[HTML Version](component_WindowsScript.shtml)