AppleScriptMBS class

Online Documentation   -   Statistics   -   FAQ   -   Plugin Parts (All, Dependencies)   -   Class hierarchy

New in Version 22.2 22.3 22.4 22.5 23.0 23.1 23.2 23.3 23.4 23.5 24.0 24.1

The list of the   topics,   classes,   interfaces,   controls,   modules,   global methods by category,   global methods by name,   screenshots,   licenses   and   examples.

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


💬 Ask a question or report a problem