FIXED BUGS
Long lists of fixed AppleScript-related bugs have been made available by Apple and will not be repeated here. You should read both of these documents (which have considerable overlap but are not identical) if you need to know what works correctly now in AppleScript that did not work right in earlier versions: Mac OS X v10.1 (Technical Note TN2029 10/15/01), and AppleScript 1.7 for Mac OS X 10.1 - Release Notes.
Additional information about bugs fixed in AppleScript 1.7, not included in the documents mentioned above, appear below.
The Script Runner icon now remembers where you left it on the screen when you log out and log back in. This solves the annoying usability problem in Mac OS X 10.0, where the button would always reappear on top of open documents near the upper left corner of the screen, no matter where you left it. This fix makes it feasible to designate Script Runner as a login item using the Login pane of System Preferences; just move the button to the lower right corner of the screen, and it will reappear there every time you log in. (Of course, Apple’s new ScriptMenu application, a separate download described above, provides an even more convenient global access point for your most-used scripts.) Another fix to Script Runner is that Apple’s example scripts for use with it (and with ScriptMenu) now come preinstalled in /Library/Scripts/, instead of being located in the AppleScript folder in /Applications/, as they were in Mac OS X 10.0, so that manual installation was necessary.
It was reported that, in Mac OS 10.0, you could not tell the Finder to make an alias file to an item and give the alias a name using the optional With Properties parameter. Now, in Mac OS X 10.1, a statement like the following works correctly: ‘make new alias file to selection at desktop with properties {name:some name}’.
NEW (AND OLD) BUGS
AppleScript 1.7 for Mac OS 9.2.2 reportedly contains severe bugs (see below) relating to the use of file paths. 12/28/01
The AppleScript 1.7 for Mac OS X 10.1 - Release Notes contain a long list of known problems with AppleScript 1.7, which will not be repeated here. A few additional bug reports relating to AppleScript in Mac OS X 10.1 have appeared, as noted below.
The Choose Application doesn’t work in a Classic Script topic in the News about AppleScript section of the AppleScript Help book discloses that you cannot use the Choose Application command in the Standard Additions scripting addition to choose an application on a remote computer in a script running in the Classic environment. You will receive an Out of Memory error. The workaround is to hard code in your script the remote computer and application instead of using Choose Application.
The When I run my AppleScript 1.6 script in Classic, it can’t find its target application topic of the News about AppleScript section of AppleScript Help indicates that errors may arise if you run a script using AppleScript 1.6 in the Classic environment with program linking turned on. The preferred cure is to install AppleScript 1.7 in the Classic environment. Unfortunately, as of this writing, AppleScript 1.7 for Classic is not yet available, and the only cure for now is to turn off program linking in the Sharing panel of System Preferences.
You cannot obtain information about a process on a remote computer. According to the I can’t get process information about a remote Finder 10.1 topic of the News about AppleScript section of AppleScript, a spurious error will be generated. I wondered whether you could work around this issue by explicitly running the System Events application on the remote machine, but the problem with remote events referred to above made it impossible to test the hypothesis.
The Never Show Startup Screen setting of a script application does not work reliably, and the startup screen may not appear when the script application is run even if the setting was turned off. This, according to the My script doesn’t display a startup screen topic in the News about AppleScript section of AppleScript Help.
Apple’s Chris Espinosa has confirmed that, in AppleScript 1.5 through 1.7 in the classic Mac OS and Mac OS X, a statement like set fileName to name of file 1 of disk 1 or get modification date of file fileName of disk 1 can break with Unicode file names in certain applications. Changes in the system underlying this problem are planned.
Apple’s Chris Nebel has suggested that one might consider it a bug that the Finder will not allow you to open hidden folders, as in ‘open folder var of startup disk’. In any event, he points out that a workaround is to construct the path to the invisible folder as a string, then tell the Finder to open an alias to it.
Chris Nebel has confirmed that the Path To command in Standard Additions fails to create a system folder that is properly requested, as it should when the folder does not currently exist.
The bug in Script Editor 1.6 that makes the left pane disappear from the dictionary window after you set its default size still exists in Script Editor 1.7. Just click on the resize box in the lower right corner of the window, and the left pane will immediately reappear. When you thereafter drag to resize the window, the left pane may jump to another size, but it will still be present.
It has been reported that using the Standard Additions’ Path To command within a Finder Tell block can cause errors when referring to special folders that are recognized both by the Finder and by Path To. This issue has long existed in the classic Mac OS, as well.
In my own testing, the Finder’s Ejectable property of every volume on my desktop is True. I had been under the impression that this property should return True only for removables such as CD’s and Jaz drives; if every volume is ejectable, there seems no point in providing an Ejectable property. Worse, I can in fact use AppleScript to eject any volume on my desktop (unless it is in use; for example, when it is the Mac OS X or Classic startup disk). Don’t try this at home, but if you use AppleScript to eject an external SCSI or Firewire disk, it isn’t easy to get it back, even after rebooting.
The Finder’s Has Scripting Terminology property still does not notice scriptable applications that come in the form of bundles or packages. These include TextEdit and Sketch (both Cocoa applications) and Internet Explorer (which is bundled but is not a Cocoa application).
It has been reported that a droplet written to generate a string path for any file dropped on it fails in Mac OS X when the file’s name contains an accented character.
AppleScript access to a Status Record in Internet Connect appears not to work. One user reports that this may be due to a misspelled Apple event code in the application.
Other bugs have been reported by users, as listed below.
If you were running AppleScript 1.6 in the Classic environment of Mac OS X and had remote program linking turned on in Mac OS X, all AppleScript Tell blocks would compile to ‘tell application AEServer’ no matter what application they were originally targeted at. This had to do with the AEServer application not having a traditional signature. The cure was to turn off program linking or upgrade to AppleScript 1.7 for Mac OS 9.2.2. 12/28/01
I discovered that the Beep command in the Standard Additions scripting addition, if given an integer parameter commanding it to beep two or more times, appears not to work correctly in Mac OS X; it appears to beep only once. Apple’s Chris Nebel, after investigating this phenomenon, reported that the computer is in fact beeping the indicated number of times. However, the command has been asynchronous since about Mac OS 7, and Mac OS X is so fast on today’s fast machines that the beeps pile on top of one another and sound like a single beep. The workaround is to call beep in a counting repeat loop that encloses a do-nothing repeat loop tuned to leave a short period of silence after each beep. 12/28/01
It has been widely reported that the presence of the file ToastVideoCDSupport.component (part of Toast 5.1P2) in the /Library/QuickTime folder causes AppleScript applets to quit unexpectedly. The cure is to remove the file. 12/28/01
Apple’s Chris Nebel reported that the cron utility will not properly run a scheduled AppleScript applet that attempts to tell a user application to do something. The reason is that cron is launched at boot time and therefore its process is owned by root, while user application processes are owned by the user. Mach won’t let processes in different groups talk to each other for security reasons. Aren’t you glad you asked? 12/28/01
The Finder’s Product Version property returns an empty string, as first reported by Mike Chambers. 12/28/01
Chris Nebel has confirmed that AppleScript 1.7 will not open folders with umlauts in their names. 10/8/02
Chris Espinosa reported that the List Folder scripting addition command no longer recognizes the case where its parameter is a string, breaking some older scripts. This feature will be reintroduced in a later release. 10/8/02
Chris Nebel confirmed a bug, apparently going back to AppleScript 1.4 and never before noticed, where setting an item in a list to the result of a handler that returns no value fails to generate an error but messes up the list. 10/8/02