So I was interested in this tutorial ...
AppleScript Studio Tutorial - Getting Started with Displaying ProgressI'll give it a try, and if I get it running I'll post the code. I've added MacScripter to my feeds as well.
One very common use for AppleScript is batch processing. Scripts of this nature will often loop through multiple items, performing some type of automated task for each item being processed. An example of this might be a script that loops through a folder of image files, converting each one to another format.
A script of this nature that is created with Script Editor, and then run, may work just fine. However, visually, it is less than spectacular. Other than a spinning cursor, and perhaps a dialog message displayed here or there during script execution, the user does not usually receive a very good visual representation of what is occurring.
This is where AppleScript Studio can come in handy. In this month's column, we will discuss adding progress bars and spinners to an AppleScript, in order to provide a visual representation of what is being processed, how much processing is complete, and how much processing remains during script execution.
[1] This insightful feeling comment, however, has given me pause:
Posted February 28, 2007 @ 12:57PM by AlanSWhich makes me even sadder that "AppleScript for Applications" (out of print) has never been updated. One of the most aggravating things about trying to use AppleScript is that so much is undocumented, under-documented, broken, incompletely implemented ...
... What makes AppleScripting difficult is not the AppleScript language, it is the OSA architecture, which pushes most of the semantics into individual applications. Not only do most applications do an abysmal job of documenting their OSA support, they also differ widely in how they choose implement basic semantics such as object references. Thus, every attempt to use AppleScript often becomes a treasure hunt to find the magic incantation to accomplish a goal. Switching to another scripting language will not solve this fundamental problem...
No comments:
Post a Comment