AppleScript.SetPropertyValue
----------------------------

Sets property value with new text.

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

MBS( "AppleScript.SetPropertyValue"; Script ID; Name; Value ) 

**MBS**( **"AppleScript.SetPropertyValue";** /\* Sets property value with new text. \*/  
**$Script ID**; /\* The Id of the script you want to execute. This ID returned by the [AppleScript.Compile](AppleScriptCompile.md) function.e.g. 1 \*/   
**$Name**; /\* The name of the property.e.g. "MyValue" \*/   
**$Value**) /\* The value of the property.e.g. "Hello" \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| Script ID | The Id of the script you want to execute. This ID returned by the [AppleScript.Compile](AppleScriptCompile.md) function. | 1 |
| Name | The name of the property. | "MyValue" |
| Value | The value of the property. | "Hello" |

### Result

Returns OK or error.

### Description

Sets property value with new text.  
Lasterror is set.  
### Examples

Sets a property:

 Set Variable \[$r ; Value:MBS ( "Applescript.SetPropertyValue"; $scriptID ; "MySubject"; AppleScript Properties::Subject )\]  
### See also

- [AppleScript.Compile](AppleScriptCompile.md)
- [AppleScript.Execute](AppleScriptExecute.md)
- [AppleScript.GetPropertyName](AppleScriptGetPropertyName.md)
- [AppleScript.GetPropertyValue](AppleScriptGetPropertyValue.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)
- [Send text message from FileMaker via iMessage](https://www.mbsplugins.de/archive/2019-03-10/Send_text_message_from_FileMak/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

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

  
[AppleScript.Run](AppleScriptRun.md) - [Archive.AddContainer](ArchiveAddContainer.md)

[HTML Version](AppleScriptSetPropertyValue.shtml)