Special

Introducing the “Welcome to Xojo” Bundle!

New to Xojo and looking for guidance? We've put together a terrific bundle to welcome you! Xojo Bundle

This bundle includes six back issues of the magazine -- all of year 21 in printed book and digital formats -- plus a one-year subscription (beginning with 22.1) so you'll be learning all about Xojo for the next year. It's the perfect way to get started programming with Xojo. And you save as much as $35 over the non-bundle price!

This offer is only available for a limited time as supplies are limited, so hurry today and order this special bundle before the offer goes away!

Article Preview


Buy Now

Issue 9.1

COLUMN

Enabling AppleEvents

Making your app scriptable

Issue: 9.1 (November/December 2010)
Author: Marc Zeedar
Author Bio: Marc taught himself programming in high school when he bought his first computer but had no money for software. He's had fun learning ever since.
Article Description: No description available.
Article Length (in bytes): 26,084
Starting Page Number: 68
Article Number: 9109
Resource File(s):

Download Icon 9109project.zip Updated: 2010-11-01 17:00:38

Related Web Link(s):

http://mac.brothersoft.com/resfool-download.html

Excerpt of article text...

A common question among REAL Studio users is how to make their applications AppleScriptable. AppleScript, if you're not familiar with it, is Apple's system-wide scripting language for Mac OS X. It works in conjunction with AppleEvents, which is a system of interapplication communication (basically, a communication system that lets apps talk to each other). AppleScript is essentially the bridge between those apps.

Fully supporting AppleEvents is tremendously complex and far beyond the scope of this simple column. Entire books have been written on the subject and I'm sure they're incomplete. It's virtually a black art known only to a few gurus.

So what do you do? You want your app to be scriptable, but you don't have the expertise and time to make it so. Today I'm going to demonstrate a shortcut. We're going to cheat!

Traditional AppleScriptability

The "normal" way of making your app scriptable is to use a resource editor to build an "aete" resource that contains all of the script commands your app will support. Just setting up one or two simple commands like this isn't easy (as you will see later). Each command must be specified in detail, along with its parameters and a million other settings. Establishing an entire scripting language for your app is best left for AppleEvent experts. Seriously. Not fun. At all.

Our Shortcut

...End of Excerpt. Please purchase the magazine to read the full article.