Changes in Applescript in Jaguar
Changes in Applescript in Jaguar
- Subject: Changes in Applescript in Jaguar
- From: Michelle Steiner <email@hidden>
- Date: Sat, 31 Aug 2002 13:15:42 -0700
This is from Apple's tech note on Jaguar.
--Michelle
AppleScript
AppleScript is a component of the operating system that provides a
scripting interface for users to automate actions on system and
application data. Even more importantly, it allows users to access
functionality of applications which would be difficult or impossible to
access by hand.
* AppleScript was ignoring the text item delimiter when converting a
list to a string if the text item delimiter was Unicode text (or, more
generally, anything but a string). This problem has been corrected. (r.
2891903).
* A problem where coercing a list of items to Unicode text does not
preserve the encoding of Unicode text items has been corrected. (r.
2883592).
* Coercions to 'short' such as 'set x to y as short' now work as
expected - meaning coerce y to x as a short integer (a 16 bit integer).
(r. 2863132).
* Added plural form of the "item" class name to Cocoa Scripting. (r.
2862538).
* A problem where disabling startup screen in stay-open applets was
not working as expected has been corrected. (r. 2859959).
* A problem where the 'list folder' command would not accept a string
as its parameter has been corrected. Now, both the commands 'list folder
(path to scripting additions folder)' and 'list folder (path to
scripting additions folder as string)' work as expected. (r. 2856926).
* A problem where coercing a folder object to a POSIX path then back
to a folder object could produce unexpected results has been corrected.
(r. 2856778).
* A problem where writing an empty string to a file was not being
interpreted as a request to set the file position has been corrected.
(r. 2855993).
* Cocoa scripting correctly converts booleans it receives from
AppleScript to boolean NSNumbers. However, when passing boolean
NSNumbers back to AppleScript Cocoa was not converting them into
AppleScript Boolean values. Cocoa now provides the correct coercion to
AppleScript Boolean values when converting boolean NSNumbers. (r.
2848562).
* The Cocoa equivalent for the AppleScript type 'msng' (missing
value) is now NSNull. (r. 2848555).
* NSAppleEventDescriptor now has the designated initializer
-initWithAEDescNoCopy method. (r. 2842470).
* "do shell script" no longer translates LF and CRLF line endings in
the command output to carriage returns. (r. 2841727).
* A problem where files created by "open for access" did not have a
type or creator has been corrected. Such files now have their type set
to "TEXT' and their creator set to "ttxt". (r. 2839361).
* Fixed problem where Cocoa Scripting's copy command could copy
objects in the wrong order. (r. 2838757).
* Fixed problem in Cocoa scripting where records were not being
passed to command handlers correctly. Rather than being passed as a
dictionary with keys and values corresponding to those in the record,
records were being passed as arrays with interlaced keys and values.
Now, records are passed as dictionaries with key value pairs. (r.
2837938).
* A problem where AppleScript's OSASetProperty call could become
unstable following a call to OSAExecute has been corrected (rr. 2830152,
2786611). (r. 2827990).
* A problem where compiled scripts containing typeTargetID address
descriptors could not be opened in Mac OS X has been corrected. This
problem affected compiled scripts containing statements of the form
'tell app "foo" of machine "eppc://..."'. (r. 2811892).
* The Cocoa scripting requirement that classes in scriptSuite
actually exist in Objective-C has been relaxed. Now, if the scriptSuite
class serves as a protocol, then there's no need for the corresponding
Objective-C class to exist. (r. 2807626).
* Fixed problem where Scriptable Cocoa applications would leak 2-6
NSTerminologyRegistry objects for each open document/close document pair
of AppleScript commands. (r. 2796255).
* The 'quoted form' property of strings now returns a valid quoted
string suitable for passing to the 'do shell script' command.
Previously, the resulting string was not encoded correctly. (r. 2793920).
* A problem that could cause a crash in scriptable Cocoa applications
that did not include a keyAEName code ('pnam') element in one of their
class descriptions has been corrected. (r. 2785426).
* Relative specifiers inside of "whose" tests are now evaluated as
expected. (r. 2784592).
* A problem related to the processing of queued events (events
received during the execution of an Apple event handler) has been
corrected. (r. 2973719).
* AppleScript enumerators in Cocoa now return the correct value when
getting a subclass' property from a superclass object. (r. 2962920).
* UTF-16 to UTF-8 coercion now works as expected. (r. 2918203).
* A problem where Cocoa Scripting was mishandling commands of the
form "make new <class> at end." has been corrected. (r. 2869492).
* A problem where "do shell script" could fail when with non-ASCII
characters in paths has been corrected. (r. 2848082).
* A problem where an AppleScript attempting to send a restart command
to a remote machine would cause the local machine running the script to
restart has been corrected. (r. 2840060).
* A problem where Cocoa Scripting did not support
copying/moving/creating one object on top of another object has been
corrected. Now, it is possible to write the following sorts of scripts
for Cocoa applications: tell application "TextEdit" to copy first word
of text of front document to title of front (r. 2838745).
* AppleScript now supports typeUTF8Text = 'utf8' for UTF-8 encoded
Unicode text. (r. 2835411).
* NSNumber<TypeCode> and NSData<...> are now valid scripting types in
scripting suite command parameters and class property declarations for
Cocoa applications. (r. 2776086).
* In Cocoa scripting, NSDictionarys returned to AppleScript will now
be appropriately converted into Apple event records so they can be
accessed as records in AppleScripts. (r. 2480527).
* In Cocoa scripting, your - (void) setX: (NSArray *)someX mutator
will now be called when someX is an array. (r. 2470009).
* Cocoa scripting now has support for implicitly specified
AppleScript properties. Now, the following sort of script works as
expected: tell front document of application "TextEdit" to first word
(r. 2243743).
* Fixed a problem where osascript would truncate its output if the
resulting string returned by the AppleScript it called contained any
null characters. Now the entire string is output as expected. (r.
2852985 ). .
We're not human beings having a spiritual experience.
We're spiritual beings having a human experience.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.