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
A class for compiling and executing Apple Scripts in RB.
Example
dim a as new AppleScriptMBS
dim lines(-1) as string

lines.Append "tell application ""Finder"""
lines.Append " activate"
lines.Append " display dialog ""Now is "" & (current date)"
lines.Append "end tell"

a.Compile Join(lines, EndOfLine.Macintosh)
a.Execute

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

This class has no sub classes.

Some examples using this class:

Blog Entries

Xojo Developer Magazine

Release notes


The items on this page are in the following plugins: MBS MacClassic Plugin.


AppleScriptErrorMBS   -   Application


The biggest plugin in space...