AppleScript is a scripting language for automating tasks on Apple Macintosh computers. It is useful in cases where you need to repeatedly perform a procedure that has many steps. It is also useful when you need to use two or more Macintosh application programs together to accomplish your work.
This document is written for use with AppleScript, but also applies to scripting Microsoft Internet Explorer with Frontier, Perl, and QuicKeys, or to scripting it by directly sending AppleEvents. It is meant to supplement the Microsoft Internet Explorer 5 AppleScript Reference.
This document assumes youre already familiar with AppleScript and know how to use the Macintosh Script Editor to browse scripting dictionaries and to create and debug scripts. If you havent used AppleScript before, you should study at least one of the following:
To learn about the scripting classes and commands provided by Microsoft Internet Explorer, read the Microsoft Internet Explorer 5 AppleScript Reference. This document contains essentially all of the information in the AppleScript dictionary of Internet Explorer in an accessible format, including all of its AppleScript words, as well as code examples and explanatory material for obscure commands.
You may also find information on scripting Internet Explorer in the Usenet newsgroup microsoft.public.inetexplorer.mac. Internet Explorer users and scripters congregate here and can often answer tough questions.
Be sure to keep both the Script Editors result window and its event log window open at all times when creating and debugging a new script. They may display valuable information.
Break complicated expressions into parts and store each part in a variable. For example, you might break this command:
set V to the W of the X of the Y of the Z
into:
set V1 to the Y of the Z
set V2 to the X of the V1
set V to the W of the V2
This will make your script much easier to debug. Note that in some cases it may result in your script running slightly more slowly, however.
Also, use parentheses wherever appropriate to make explicit any assumptions you have about the order of evaluation in expressions.