Search: Focus:

Use the fields above to enter a search or search/focus. Use the search field to match your desired topic
and use the focus field to refine it.

Applescript, Applescript

More generally, "AppleScript" is the word used to designate the Mac OS scripting interface, which is meant to operate in parallel with the graphical user interface.

HyperCard had an English language-based scripting language called HyperTalk, which could be used for embedding logic and behavior into a HyperCard stack. Apple engineers recognized that a similar scripting language could be designed to be used with any application, and the AppleScript project was born as part of System 7.

QuarkXPress (ver. 3.2) was one of the first major software applications that supported AppleScript. This in turn led to AppleScript being widely adopted within the publishing and prepress world, often tying together entire complex workflows. This was a key factor in retaining the Macintosh's dominant position in publishing and prepress, even after QuarkXpress and other publishing applications were ported to Microsoft Windows.

AppleScript can be used to create automated workflows which can reduce the amount of time it takes to perform various tasks, minimize the opportunity for human error, provide consistent output and facilitate a manageable production system.

This is possible because all Mac programs tend to use somewhat standard Apple Events to communicate with the operating system; AppleScript leverages this to allow the programs to communicate with each other as well.

For many applications that support plug-ins, the plug-ins themselves may be AppleScriptable and would include an Apple Event dictionary that would be merged with the Application's dictionary at run time. In order to view an application's AppleScript Dictionary, simply open the application using the Script Editor, contained in the AppleScript folder in the Applications folder. This will allow the user to see what commands an application understands, and whether the application is even scriptable.

These applications are said to be "recordable" because Script Editor can record their user interface Apple Events, creating an AppleScript macro line-by-line as you work.

However, you can do everything else: move the insertion point; add, edit, or remove code; even compile your script. The recordable application collaborates in a sense with your AppleScript writing, rather than replacing it. This approach typically yields more practical results than attempting to record an entire script from start to finish.

Under Cocoa, AppleScript is much "thinner"; the script engine decodes the script, translates object names from human-readable to their internal format, and then calls those methods on the target application directly.

For example, rather than a different verb to print a page, document or range of pages (printPage, printDocument, printRange) appleScript uses a single "print" verb which can be combined with an object, such as a page, a document or a range of pages.

Scripts are written into document editing window and can be compiled and run from the Script Editor window. Scripts can also be saved as AppleScript applications (applets) or compiled scripts. Script Editor also provides access to a reference library of Apple Events dictionaries corresponding to the scriptable applications on your computer, and can log the Events and Results of scripts run from Script Editor for debugging purposes.

The AppleScript Utility allows the user to: Set the Default Script Edior; Enable GUI Scripting; Set Up Folder Actions; Show the Script Menu in the Menu Bar.

AppleScript Studio is not an actual standalone product, but rather a marketing name for the ability of Xcode to create applications using AppleScript.

Script Debugger is a more advanced AppleScript environment that allows you to debug AppleScripts via single stepping, breakpoints, stepping in and out of functions/subroutines, variable tracking, etc. Script Debugger also contains an advanced dictionary browser that allows you to see the dictionary in action in real world situations. That is, rather than just a listing of what the dictionary covers, you can open a document in say Apple's Pages, and see how the dictionary's terms apply to that document, making it easier to figure out what parts of the dictionary you would want to use. Script Debugger is not designed to create scripts with a GUI, other than basic alerts and dialogs, but is focused more on the coding and debugging of scripts.

It has much of the same functionality as Xcode's AppleScript abilities, but without the ability to talk to the larger Cocoa frameworks.

Mac OS X includes a collection of scripting additions referred to as Standard Additions, which extends the function of AppleScript with a variety of new commands, including user interaction dialogs, reading and writing files, file system commands, date functions, text and math operations.

Source: Wikipedia > Applescript





QuickyWiki beta

What is QuickyWiki? QuickyWiki blends the depth of Wikipedia with the ease and speed of Cliffs Notes.




More from TRYNT



Sponsors



Powered by Odin Assemble