Platforms to show: All Mac Windows Linux Cross-Platform
AppleScriptMBS class
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
class | Apple Script | MBS MacClassic Plugin | 3.1 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
Your application may need the NSAppleEventsUsageDescription entry in info.plist to do any AppleScript usage:
https://developer.apple.com/documentation/bundleresources/information_property_list/nsappleeventsusagedescription
If you use hardened runtime, which you need for notarization, you may need the entitlement for Apple Events, too:
https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_security_automation_apple-events
- event Periodic as Integer
- 9 properties
- property AllowInteraction as Boolean
- property CanUnicodeText as Boolean
- property Handle as Integer
- property Lasterror as Integer
- property ResultID as Integer
- property ScriptID as Integer
- property UnicodeText as Boolean
- property Binary as string
- property ScriptPropertyValue(name as string) as string
- 12 methods
- method close
- method Compile(text as string)
- method CountScriptProperties as Integer
- method Error as AppleScriptErrorMBS
- method Execute
- method ExecuteEvent(eventname as string, parameters() as string)
- method Result as string
- method ResultAsStringArray as string()
- method ResultDisplayString as string
- method ScriptProperty(index as Integer) as string
- method Source as string
- method SourceTextStyle as string
This class has no sub classes.
Some examples using this class:
- /MacClassic/AppleScript/AppleScript
- /MacClassic/AppleScript/AppleScript Editor
- /MacClassic/AppleScript/AppleScript Root Shell
- /MacClassic/AppleScript/AppleScript Unicode
- /MacClassic/AppleScript/AppleScript with Parameter
- /MacClassic/AppleScript/AppleScript with Periodic Event
- /MacClassic/AppleScript/AppleScript with Unicode
- /MacClassic/AppleScript/Test property and result
- /MacClassic/Summary with AppleScript
- /MacCocoa/NSStatusItem/Display current iTunes Song
Blog Entries
- MBS Xojo Plugins, version 17.6pr2
- MBS Xojo Plugins, version 17.5pr5
- Tip of the day: AppleScript with Properties to pass file path
- MBS Xojo / Real Studio Plugins, version 15.0pr7
- MBS REALbasic plug-in 9.6
Xojo Developer Magazine
Release notes
- Version 18.0
- Removed deprecation note for AppleScriptMBS.
- Version 17.5
- Added AppleScriptMBS.AllowInteraction property.
The items on this page are in the following plugins: MBS MacClassic Plugin.
AppleScriptErrorMBS - Application