Home

At Your Service

Prepress AutoTools

Scripting
Frontier

REALbasic
Tips & Samples
Spell Checker
Plugins
Buglist

Siteliner

In The News

Contact Info


 

Macrobyte Resources

Tips and Samples

This page lists a number of tips and tricks for building AppleEvents in REALbasic, and links to downloadable sample files which demonstrate very specific procedures and uses of AppleEvents.


CaptureAE

CaptureAE is a control panel that WestCode Software distributes as freeware, for use with their own top-rated OneClick macro utility. When open, it records every AppleEvent sent by any application, and displays it in a (fairly) easy to read format in its window. The format is designed for direct import to OneClick, so we just use it to gather information about the events.

Download CaptureAE from http://www.westcodesoft.com/FTPOCTools.html

Back to Top

Apple's Inside Macintosh: Interapplication Communication

This book is the AppleEvent bible. Don't consider it optional, you really can't master AppleEvents without it. Thankfully, you can get it for free.

Apple provides this book in three different formats: printed, PDF, and HTML. You can get your copy at http://developer.apple.com/techpubs/mac/IAC/IAC-2.html

Back to Top

AE Finder Examples Project

Updated Fri, Dec 18, 1998

This project contains a number of useful examples of sending AppleEvents to the Finder from RB. The project file was created in 1.0 (not the developer release).

Here's a list of the examples you'll find in this project:

  • Opening a file in a different application
  • Adding a file's alias to the Apple Menu Items folder
  • Revealing a file in the Finder
  • Revealing a folder in the Finder
  • Moving a file to the Trash
  • Searching for a file name in the Finder

Download aeFinderExamples.sit.hqx - 8 KB

Back to Top


Handling the Required Event: Print Document

This project provides information on receiving AE's, handling a requred event, and parsing an AppleEventObjectSpecifier.

REALbasic provides an event in the app object for the required events "Open Document", and "Quit", but nothing is provided for the "Print Document" event. This sample code aims to show you how to handle this situation, and actually provides better than average support.

There are only two methods/events used in this project file. The first is in the app object's HandleAppleEvent event. The other is a custom method, also in the app object, named HandlePrintEvent.

Read them both! There is practically no real code there (only 39 lines): just enough to make something happen when the event is received. There are many lines of comments, though, so it should be fairly easy to follow.

Download print_document.sit.hqx - 5 Kb

Back to Top

Matt Neuburg's TinyFind Example

TinyFind is a small demonstration app that, among other things, shows how to use AppleEvents to perform a "Search by Content" with TextMachine.

Read more on Matt's REALthings page.

Download TinyFind.hqx - 11 Kb

Matt Neuburg's home page is here.

Back to Top






This site built using Frontier 5 with a Macintosh. Last updated Thursday, March 25, 1999
Contact Macrobyte Resources with comments or questions.