AppleScript.Close
-----------------

Removes a Script from memory.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [AppleScript](component_AppleScript.md) | [1.0](newinversion10.md) | ✅ Yes | ❌ No | ❌ No | ✅ Yes, on macOS | ❌ No |

MBS( "AppleScript.Close"; Script ID ) 

**MBS**( **"AppleScript.Close";** /\* Removes a Script from memory. \*/  
**$Script ID**) /\* The ID returned by the "[AppleScript.Compile](AppleScriptCompile.md)" function.e.g. 1 \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| Script ID | The ID returned by the "[AppleScript.Compile](AppleScriptCompile.md)" function. | 1 |

### Result

Returns "OK" or an error message.

### Description

Removes a Script from memory.  
Not really necessary since scripts don't take much space.  
### Examples

Remove A compiled Script from memory

 MBS ( "Applescript.Close" ; $scriptID )  
### See also

- [AppleScript.Compile](AppleScriptCompile.md)
- [AppleScript.Execute](AppleScriptExecute.md)
- [AppleScript.GetPropertyName](AppleScriptGetPropertyName.md)
- [AppleScript.List](AppleScriptList.md)
- [AppleScript.PropertyCount](AppleScriptPropertyCount.md)
- [AppleScript.Run](AppleScriptRun.md)
- [CNContact.SetValue](CNContactSetValue.md)
- [CNContact.Value](CNContactValue.md)

### Blog Entries

- [Read and write notes in Contacts](https://www.mbsplugins.de/archive/2023-11-19/Read_and_write_notes_in_Contac/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 18th August 2014 , last changed 31st October 2016

  
[App.UserID](AppUserID.md) - [AppleScript.Compile](AppleScriptCompile.md)

[HTML Version](AppleScriptClose.shtml)