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 14 in printed book and digital formats -- plus a one-year subscription 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 1.1

COLUMN

Revealing AppleScript

Controlling other applications using AppleScripts

Issue: 1.1 (August/September 2002)
Author: Dean Davis
Author Bio: Dean Davis is the author of the shareware program WeatherManX and a huge AppleScript enthusiast.
Article Description: Controlling other applications with AppleScripts
Article Length (in bytes): 5,009
Starting Page Number: 42
Article Number: 1013
Resource File(s):

Download Icon 1013.zip Updated: 2013-03-11 19:07:55

Related Link(s): None

Excerpt of article text...

AppleScript has always been one of the best-kept secrets of the Macintosh world. Most users know it exists but haven&t taken the steps to harness its powers. REALbasic does a very good job at integrating AppleScript technology into its architecture.

AppleScript allows your application to control, or be controlled, by other applications. With proper programming, this interaction between programs can work across a network, even the internet. Letting other applications control a REALbasic program is done using AppleEvents and is a topic for another article. Teaching AppleScript is also out of the scope of this column.

Controlling other programs can be accomplished in two different ways. The controlling program can create and send AppleEvents to a target program, or the controlling program can call a compiled AppleScript &program.& The former is the more powerful method but is more difficult to program; the latter method is limited but very easy to program. We will concentrate on the latter method with this column.

A program can utilize three different types of scripts. The first type are simple, where the script simply accomplishes a task. Emptying the Trash is a good example.

tell application "Finder"

empty trash

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