Platforms to show: All Mac Windows Linux Cross-Platform
Back to AppleScriptMBS class.
AppleScriptMBS.Binary as string
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | Apple Script | MBS MacClassic Plugin | 3.1 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
You can save and load this value to store scripts.
Lasterror is set.
(Read and Write computed property)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Apple Script | MBS MacClassic Plugin | 3.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
There is no need to call this method except you want to free all resources of this object now without waiting for Xojo to do it for you.
AppleScriptMBS.Compile(text as string)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Apple Script | MBS MacClassic Plugin | 3.1 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
Lasterror is set.
Text should be in MacRoman or UTF16 text encoding for best results.
AppleScriptMBS.CountScriptProperties as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Apple Script | MBS MacClassic Plugin | 3.1 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
Lasterror is set.
Some examples using this method:
AppleScriptMBS.Error as AppleScriptErrorMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Apple Script | MBS MacClassic Plugin | 3.1 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
Returns nil on any error.
The returned object may be empty.
The error information is changed whenever you compile or execute.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Apple Script | MBS MacClassic Plugin | 3.1 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
Lasterror is set.
If you use this method, please make sure your own Application's HandleAppleEvent method doesn't block executing by returning true for unknown events.
AppleScriptMBS.ExecuteEvent(eventname as string, parameters() as string)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Apple Script | MBS MacClassic Plugin | 3.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
The eventname must be the name of the event in pure ASCII or MacRoman encoding (and lowercase!).
The parameters can be unicode. The array is based on 0, so string in parameters(0) is the first parameter.
Lasterror is set.
Some examples using this method:
AppleScriptMBS.Result as string
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Apple Script | MBS MacClassic Plugin | 3.1 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
Returns "" on any error.
If unicode is enabled, this string is unicode (UTF16).
AppleScriptMBS.ResultAsStringArray as string()
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Apple Script | MBS MacClassic Plugin | 9.6 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
On any error the array is empty.
If unicode is enabled, this strings are unicode (UTF16).
AppleScriptMBS.ResultDisplayString as string
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Apple Script | MBS MacClassic Plugin | 9.6 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
This is the same as Result, but a flag is set to tell AppleScript that the string is for display to a human. So it may not be good for input to the AppleScript compiler.
Returns "" on any error.
If unicode is enabled, this string is unicode (UTF16).
AppleScriptMBS.ScriptProperty(index as Integer) as string
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Apple Script | MBS MacClassic Plugin | 3.1 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
Index is from 0 to CountScriptProperties-1.
Lasterror is set.
Some examples using this method:
AppleScriptMBS.ScriptPropertyValue(name as string) as string
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | Apple Script | MBS MacClassic Plugin | 3.1 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
If name or value are UTF16 encoding, than the plugin passes UTF16. Else it passes the bytes and AppleScript may assume MacRoman encoding.
(Read and Write computed property)
Some examples using this property:
AppleScriptMBS.Source as string
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Apple Script | MBS MacClassic Plugin | 3.1 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
AppleScriptMBS.SourceTextStyle as string
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Apple Script | MBS MacClassic Plugin | 3.3 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
Doesn't work for unicode text.
Some examples using this method:
The items on this page are in the following plugins: MBS MacClassic Plugin.