About some words “Script” “Command” “AppleScript” About dictionary Known problems A bug of AppleScript A problem that script stops |
The word “script” has two meanings in Mac OS system.
1) | Script of “script system”. Script system is what enables reading and writing text in language you use. Each script system is indexed by number called “script code”. For example, Roman script system (that is build-in) covers English, German, French and many other languages, and Japanese script system enables Japanese language text on your computer. The term “script system” or “script code” is important in QuoEdit but it isn’t the main theme of this Scripting Guide. |
2) | Program that you can write easily. Especially, this Scripting Guide mainly describes script in AppleScript language. Writing scripts is usually called “scripting” and system that enables scripting is called “scripting component”. |
“Command” of AppleScript is often called “event” from view point of the Apple event. That would be useful to distinguish it from the application’s menu command.
In this Scripting Guide, however, AppleScript’s command is basically called “command” while application’s menu command is called “menu command” explicitly.
“AppleScript”
AppleScript is one of scripting languages which support Open Scripting Architecture (OSA) of Apple Computer and it is implemented by AppleScript scripting component installed. So, you may be occasionally able to take “AppleScript” in this guide as “AppleScript or other scripting language (or component)”.*
* | Actually, QuoEdit was mostly tested with AppleScript but other scripting components. |
tell application "Finder" open (path to application "QuoEdit") using application file id "ToyS" end tellNote that this Scripting Guide is supposed to describe information that could not be described in the dictionary, rather than every term supported by QuoEdit.
When you run a script from the Script Editor showing the execution result or the event log, the Script Editor sometimes crashes or shows dust string if the result text or the event log text includes null character (character whose code is 0; usually included only in binary data). This is a bug of AppleScript (maybe newer versions of AppleScript) rather than the Script Editor that is generated when AppleScript makes a text string to show. A bug report on this issue was submitted to Apple Computer and the issue is already known by them.
A problem that script stops
When a script that was run by QuoEdit launches or activates some application, the execution might sometimes stop. In such a case, try deactivating QuoEdit by clicking on the Desktop and the execution will go on. (But never type Command+Tab.) If QuoEdit looks frozen, once quit application by Command+Option+Esc keys.
As for the solution, try modifying the script so that the script makes the Finder open the target application. That works in my experiences. And the problem might depend on applications running in background.