•Changes in the AEUT AppleScript SDK January 22, 1999   Located in the English Dialect file in the Dialects folder of the Scripting Additions folder, the Œaeut¹ resource provides the bulk of the terminology for AppleScript. All terms compiled outside of a Tell block rely on terminology from the Œaeut¹ resource. There are nine suites in the Œaeut¹ resource. Of these, the AppleScript suite is the largest, and its terms are global to AppleScript (valid in all contexts). The remaining suites (Required, Standard, Text, Database, QuickDraw, QuickDraw Supplemental, Macintosh Connectivity Classes, and Type Names) are included only if your application¹s terminology explicitly includes them by including a suite with the matching four-character code. For AppleScript 1.3 and later, there have been significant changes to the Œaeut¹ that make it clearer and more correct, and add features for use by applications and scripts. Terms removed The Required Suite was removed. The ³open² and ³print² events were subsets of more fully-featured versions in the Standard Suite, and those versions are preferred. The ³run² and ³quit² events have been moved to the Standard Suite. It is now no longer necessary to include a Required Suite of any sort in your scriptable application. The ³copy² and ³do script² events were removed from the Standard suite. The ³copy² event is ambiguous and has been replaced by the Clipboard events in the Standard Additions; removing the event from the Standard suite will prevent confusion with AppleScript¹s built-in ³copy² command. The ³do script² event will be moved into the Miscellaneous Standards suite. The prepositions ³until² and ³returning² were removed from the terminology of the ³Call€Subroutine² event as they are not implemented in AppleScript. Terms added Several events and classes were added, most to the AppleScript suite, to support new data types or systemwide features. Many of these terms support Unicode and unit coercions and the Macintosh Connectivity classes; see the specific documents on those topics included in this SDK. Events kAEReopenApplication reopen suite: Œaevt¹ code: Œrapp¹ ___________________________________________________________ A new event was added to the Standard Suite in Mac OS 8 to signal applications that they are being double-clicked in the Finder while already running. This signals the application to activate, and if there are no document windows, to open an untitled document as if the application was being launched for the first time. This is in response to common user confusion in launching already-open applications via an alias; users miss the change in the menu bar and application icon and do not realize they have switched into an already-running application. Script applications may choose to handle the reopen event by writing a ³reopen² handler, or send the ³reopen² event to applications that are already open in order to bring up a new, untitled window. Classes cPict picture code: ŒPICT¹ ___________________________________________________________ A new class, ³picture², has been added to the AppleScript suite. This is the type code for picture objects on the Clipboard. The dataHandle of a cPict object is a QuickDraw picture. typeSound sound code: Œsnd ¹ ___________________________________________________________ A new class, ³sound², has been added to the AppleScript suite. This is the type code for sound objects on the Clipboard. The dataHandle of a typeSound object is an Œsnd ¹ resource. cAliasOrString alias or string code: Œsf ¹ ___________________________________________________________ A new class, ³alias or string², has been added to the AppleScript suite. This is useful as a type code for input parameters for events that expect typeAlias values but will automatically coerce pathname strings into alias values. Like other ³or² types, this type class should not be used as the descriptorType of any actual descriptor record; it should only be used in terminology to designate the possible input values for a parameter. cMissingValue missing value (plural: missing values) code: Œmsng¹ ___________________________________________________________ A new constant cMissingValue has been defined. Its primary use is as a placeholder in list results: if a script attempts an operation on a list (e.g., ³x of every y²) but the operation does not make sense for every item in the list (e.g., not every y has an x), the missing values can be filled in with ³missing value². This way, there is always a one-to-one correspondence between the original list and the result list. cKeystroke keystroke (plural: keystrokes) code: Œkprs¹ ___________________________________________________________ This class represents a keystroke on the keyboard. It is used, for example, in the Application Window extension in Mac OS 8.5 to get and set the hot key for switching applications. The dataHandle of a cKeystroke object is a coerced AERecord with record elements corresponding to the following properties: Properties pKey key type: Œcha ¹ code: ŒkMsg¹ The character that would be generated if the key were to be pressed without any modifier keys pModifiers modifiers type: ŒeMds¹ code: ŒkMod¹ A list of the modifier keys held down when the key is pressed. pKeyKind key kind type: Œekst¹ code: Œkknd¹ The kind of key, or the specific special key if the key does not generate a character. Enumerations eModifiers code: ŒeMds¹ An enumeration for the modifier keys of the ³modifiers² property of the ³keystroke² class, which can comprise these values: eOptionDown option key down code: ŒKopt¹ eCommandDown command key down code: ŒKcmd¹ eControlDown control key down code: ŒKctl¹ eShiftDown shift key down code: ŒKsft¹ eCapsLockDown caps lock key down code: ŒKclk¹ eKeyKind An enumeration for the ³key kind² property. The value of this enumeration is Œks¹ followed by the virtual key code for the key and a null byte, so it is easy to synthesize this enumeration from a key code. eEscapeKey escape key code: 0x6B733500 eDeleteKey delete key code: 0x6B733300 eTabKey tab key code: 0x6B733000 eReturnKey return key code: 0x6B732400 eClearKey clear key code: 0x6B734700 eEnterKey enter key code: 0x6B734C00 eUpArrowKey up arrow key code: 0x6B737E00 eDownArrowKey down arrow key code: 0x6B737D00 eLeftArrowKey left arrow key code: 0x6B737B00 eRightArrowKey right arrow key code: 0x6B737C00 eHelpKey help key code: 0x6B737200 eHomeKey home key code: 0x6B737300 ePageUpKey page up key code: 0x6B737400 ePageDownKey page down key code: 0x6B737900 eForwardDelKey forward del key code: 0x6B737500 eEndKey end key code: 0x6B737700 eF1Key F1 key code: 0x6B737A00 eF2Key F2 key code: 0x6B737800 eF3Key F3 key code: 0x6B736300 eF4Key F4 key code: 0x6B737600 eF5Key F5 key code: 0x6B736000 eF6Key F6 key code: 0x6B736100 eF7Key F7 key code: 0x6B736200 eF8Key F8 key code: 0x6B736400 eF9Key F9 key code: 0x6B736500 eF10Key F10 key code: 0x6B736D00 eF11Key F11 key code: 0x6B736700 eF12Key F12 key code: 0x6B736F00 eF13Key F13 key code: 0x6B736900 eF14Key F14 key code: 0x6B736B00 eF15Key F15 key code: 0x6B737100 Terms changed or moved The direct parameter of the ³comment² event was changed from a typeWildCard to a typeChar. Many comments were added to events, classes, parameters, and properties that did not have comments. The direct parameter of the ³launch², ³tell², ³end tell², and ³error² events were changed from typeWildCard to typeNull. The replyRequired bit of the ³launch² and ³error² events were changed to replyOptional. In the ³Call€Subroutine² event, the position of the ³about² parameter was moved from after ³with² and ³without² to after ³apart from². The ³given² parameter was moved to between ³since² and ³with². The type of the ³with² and ³without² parameters were changed from typeWildCard to typeType. The ³reverse² and ³rest¹ properties were moved from AppleScript¹s ³application² class to the ³list² class, to better reflect the fact that they only apply to list objects. In the ³script² class, a ³name² property has been added to the terminology. The ³alias² class was moved from the Type Names suite to the Standard Suite. In the ³class² class, the ³² property was changed from type cIdentifier to typeType. The terminology of the ³key² class (cKeyForm) was changed to ³reference form² with plural ³reference forms². The ³text² class was moved to the AppleScript Suite from the Type Names suite. The ³string² class (typeIntlText) was moved from the Type Names suite to the AppleScript Suite, and its terminology was changed to ³international text². This had been causing many problems in applications that included the Type Names suite; there was a conflict between ³string² as typeChar and ³string² as typeIntlText. In the AERegistry.h header files, the constant cString was changed to cStringClass to avoid conflicts with PowerPlant. The ³character² class was moved from the Type Names suite to the AppleScript suite. The ³file specification² class was moved from the Type Names suite to the AppleScript suite. In the ³count² event in the Standard suite, the ³each² parameter has been changed to ³optional² from ³required². In the ³duplicate² event in the Standard suite, an additional property has been added: Properties keyAEPropData with properties type: Œreco¹ code: Œprdt¹ A record of initial values for the duplicate object. These values override the values in the original object or default read-only values for the object. In the ³make² event in the Standard suite, the ³at² parameter was changed to ³optional² from ³required². The ³select² event was moved from the Miscellaneous Standards suite to the Standard Suite, The ³data size², ³suite info², ³event info², and ³class info² events were moved to the end of the standard suite to diminish their importance. Very few applications support the info commands. Data size is useful for many tangible objects but is often misleading; developers often return the size of the AppleEvent descriptor record rather than the size of the underlying object. It is recommended that if the user may be interested in the physical size of an object, you should provide a read-only property of the object that returns its actual size. In the ³selection-object² class in the Standard Suite, the ³contents² property was changed from ³readOnly² to ³readWrite². In the Text Suite, all other classes were changed to inherit from cText, and the standard text properties were moved to be properties of only the cText class. ________________________________ © 1998 Apple Computer. Inc. All rights reserved. Apple, the Apple logo, LaserWriter, MacTCP, Power Macintosh, Mac, and Macintosh are trademarks of Apple Computer, Inc., registered in the U.S. and other countries. PowerPC is a trademark of International Business Machines Corporation, used under license therefrom. All other product names are trademarks or registered trademarks of their respective holders. Mention of non-Apple products is for information purposes and constitutes neither an endorsement nor a recommendation. Apple assumes no responsibility with regard to the selection, performance, or use of these products. Updated January 22, 1999 v 1.0