Platforms to show: All Mac Windows Linux Cross-Platform
Back to NSAppleScriptMBS class.
NSAppleScriptMBS.compile as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Apple Script | MBS MacCocoa Plugin | 11.2 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
error: Optional, on return, if an error occurs, an error information dictionary.
Return Value
Returns true for success or if the script was already compiled, false otherwise.
See also:
NSAppleScriptMBS.compile(byref error as dictionary) as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Apple Script | MBS MacCocoa Plugin | 11.2 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
error: Optional, on return, if an error occurs, an error information dictionary.
Return Value
Returns true for success or if the script was already compiled, false otherwise.
See also:
NSAppleScriptMBS.Constructor(file as folderitem, byref error as Dictionary)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Apple Script | MBS MacCocoa Plugin | 11.2 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
file: A folderitem that locates a script, in either text or compiled form.
error: On return, if an error occurs, the error information dictionary.
Handle is zero in case of error.
See also:
NSAppleScriptMBS.Constructor(source as string)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Apple Script | MBS MacCocoa Plugin | 11.2 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
Handle is zero in case of error.
See also:
NSAppleScriptMBS.Constructor(sourceLines() as string)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Apple Script | MBS MacCocoa Plugin | 13.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
Handle is zero in case of error.
See also:
NSAppleScriptMBS.Constructor(URL as string, byref error as Dictionary)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Apple Script | MBS MacCocoa Plugin | 11.2 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
file: A folderitem that locates a script, in either text or compiled form.
error: On return, if an error occurs, the error information dictionary.
Handle is zero in case of error.
See also:
NSAppleScriptMBS.copy as NSAppleScriptMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Apple Script | MBS MacCocoa Plugin | 11.2 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
NSAppleScriptMBS.execute as NSAppleEventDescriptorMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Apple Script | MBS MacCocoa Plugin | 11.2 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
error: Optional, on return, if an error occurs, an error information dictionary.
Returns the result of executing the event, or nil if an error occurs.
Any changes to property values caused by executing the script do not persist.
See also:
NSAppleScriptMBS.execute(byref error as dictionary) as NSAppleEventDescriptorMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Apple Script | MBS MacCocoa Plugin | 11.2 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
error: Optional, on return, if an error occurs, an error information dictionary.
Returns the result of executing the event, or nil if an error occurs.
Any changes to property values caused by executing the script do not persist.
See also:
NSAppleScriptMBS.executeAppleEvent(event as NSAppleEventDescriptorMBS, byref error as dictionary) as NSAppleEventDescriptorMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Apple Script | MBS MacCocoa Plugin | 11.2 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
event: The Apple event to execute.
error: On return, if an error occurs, an error information dictionary.
Returns the result of executing the event, or nil if an error occurs.
Compiles the receiver before executing it if it is not already compiled.
Important: You cannot use this method to send Apple events to other applications.
NSAppleScriptMBS.executeSubroutine(Name as String, parameters() as NSAppleEventDescriptorMBS, byref error as dictionary) as NSAppleEventDescriptorMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Apple Script | MBS MacCocoa Plugin | 16.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
Similar to executeAppleEvent, but creates the apple event for you.
Name: The name of the subroutine to execute.
parameters: The parameters for the subroutine.
error: On return, if an error occurs, an error information dictionary.
Returns the result of executing the event, or nil if an error occurs.
Compiles the receiver before executing it if it is not already compiled.
Important: You cannot use this method to send Apple events to other applications.
Some examples using this method:
NSAppleScriptMBS.properties as string()
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Apple Script | MBS MacCocoa Plugin | 11.3 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
NSAppleScriptMBS.setValueDescriptorForProperty(propertyName as string, value as NSAppleEventDescriptorMBS) as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Apple Script | MBS MacCocoa Plugin | 11.3 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
Some examples using this method:
NSAppleScriptMBS.valueDescriptorForProperty(propertyName as string) as NSAppleEventDescriptorMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Apple Script | MBS MacCocoa Plugin | 11.3 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
Some examples using this method:
The items on this page are in the following plugins: MBS MacCocoa Plugin.
