# Applescript > Scripting allows you to automate complex, repetitive, and time-consuming tasks by writing scripts that interact with apps, processes, and the operating system. A script consists of a series of stateme ## Pages - [Mac Automation Scripting Guide: About Mac Scripting](mac-automation-scripting-guide-about-mac-scripting.md): Scripting allows you to automate complex, repetitive, and time-consuming tasks by writing scripts that interact with ... - [Mac Automation Scripting Guide: Working with XML](mac-automation-scripting-guide-working-with-xml.md): The XML Suite of the System Events scripting dictionary defines several classes that make it quick and easy to read a... - [Mac Automation Scripting Guide: Removing HTML Markup from Text](mac-automation-scripting-guide-removing-html-markup-from-text.md): When parsing HTML content, it’s often necessary to remove markup entirely. The handler inListing 34-1removes all HT... - [Mac Automation Scripting Guide: Displaying Progress](mac-automation-scripting-guide-displaying-progress.md): Many scripts perform large and time-consuming processing operations. All too often, they do this invisibly; they simp... - [Mac Automation Scripting Guide: Creating a Script](mac-automation-scripting-guide-creating-a-script.md): Generally, most scripts are written in Script Editor documents. Scripts can also be written in Xcode, but this is typ... - [Mac Automation Scripting Guide: Parsing HTML](mac-automation-scripting-guide-parsing-html.md): The process of reading an HTML file is no different than the process of reading a standard text file—seeReading a F... - [Mac Automation Scripting Guide: Running a Script](mac-automation-scripting-guide-running-a-script.md): Scripts can be opened and run in Script Editor and script applications can be run outside of Script Editor like any o... - [Mac Automation Scripting Guide: Objective-C to AppleScript Quick Translation Guide](mac-automation-scripting-guide-objective-c-to-applescript-quick-translation.md): This appendix provides AppleScript equivalents for typical Objective-C features of a class. Below the table is a list... - [Introduction to AppleScript Language Guide](introduction-to-applescript-language-guide.md): This document is a guide to the AppleScript language—its lexical conventions, syntax, keywords, and other elements.... - [Mac Automation Scripting Guide: How Mac Scripting Works](mac-automation-scripting-guide-how-mac-scripting-works.md): TheOpen Scripting Architecture (OSA)provides a standard and extensible mechanism for interapplication communication i... - [Mac Automation Scripting Guide: Opening a Scripting Dictionary](mac-automation-scripting-guide-opening-a-scripting-dictionary.md): Script Editor can open dictionaries and display their contents for you to consult while writing scripts. - [Mac Automation Scripting Guide: Displaying Notifications](mac-automation-scripting-guide-displaying-notifications.md): Notification Center offers another opportunity for providing feedback during script execution. Use the Standard Addit... - [Mac Automation Scripting Guide: Prompting for a Choice from a List](mac-automation-scripting-guide-prompting-for-a-choice-from-a-list.md): Use the Standard Additions scripting addition’schoose from listcommand to prompt the user to select from a list of ... - [Mac Automation Scripting Guide: Processing Dropped Files and Folders](mac-automation-scripting-guide-processing-dropped-files-and-folders.md): Droplets are applets configured to process dropped files and folders. A droplet is distinguishable from a normal appl... - [Mac Automation Scripting Guide: Manipulating Lists of Items](mac-automation-scripting-guide-manipulating-lists-of-items.md): In scripting, a list—typically referred to as an array in JavaScript—is a an ordered collection of values that’... - [Mac Automation Scripting Guide: Referencing Files and Folders](mac-automation-scripting-guide-referencing-files-and-folders.md): In AppleScript, file and folder paths are typically represented usingalias,file, andPOSIX fileobjects. - [Mac Automation Scripting Guide: Manipulating Images](mac-automation-scripting-guide-manipulating-images.md): Image Events is a scriptable background app in OS X that can be used to automate the manipulation of images without ... - [Mac Automation Scripting Guide: Navigating a Scripting Dictionary](mac-automation-scripting-guide-navigating-a-scripting-dictionary.md): A scripting dictionary window in Script Editor contains three primary areas. SeeFigure 12-1. - [Mac Automation Scripting Guide: Reading and Writing Files](mac-automation-scripting-guide-reading-and-writing-files.md): Scripts are often designed to write data to files such as logs or backups. The Standard Additions scripting addition ... - [Mac Automation Scripting Guide: About this Guide](mac-automation-scripting-guide-about-this-guide.md): This guide provides high-level information about scripting on the Mac and isn’t designed to serve as a language gui... - [Mac Automation Scripting Guide: Watching Folders](mac-automation-scripting-guide-watching-folders.md): The ability to watch folders and take action on incoming items is a powerful automation technique that enables the cr... - [Mac Automation Scripting Guide: Using Dictation to Run Scripts](mac-automation-scripting-guide-using-dictation-to-run-scripts.md): Dictation commands is a powerful accessibility feature in OS X that lets you control your Mac using your voice. With ... - [Mac Automation Scripting Guide: Making a Systemwide Service](mac-automation-scripting-guide-making-a-systemwide-service.md): In OS X,serviceslet you access functionality in one app from within another app. An app that provides a service adve... - [Mac Automation Scripting Guide: Prompting for Text](mac-automation-scripting-guide-prompting-for-text.md): Use thedisplay dialogcommand’s optionaldefault answerparameter to collect text, such as a username or email address... - [Mac Automation Scripting Guide: Converting RGB to HTML Color](mac-automation-scripting-guide-converting-rgb-to-html-color.md): In HTML documents, colors are typically represented as hex values. The handlers inListing 31-1andListing 31-2show how... - [Mac Automation Scripting Guide: Automating the User Interface](mac-automation-scripting-guide-automating-the-user-interface.md): Unfortunately, not every Mac app has scripting support, and those that do may not always have scripting support for e... - [Mac Automation Scripting Guide: Manipulating Text](mac-automation-scripting-guide-manipulating-text.md): Manipulating text is one of the most common tasks performed in scripts. AppleScript and JavaScript both possess some ... - [Mac Automation Scripting Guide: Saving a Script](mac-automation-scripting-guide-saving-a-script.md): After you write a script, you can save it for future reference or to be run outside of Script Editor. - [Mac Automation Scripting Guide: Configuring Scripting Preferences](mac-automation-scripting-guide-configuring-scripting-preferences.md): Script Editor preferences allows you to configure a variety of aspects of scripting behavior. - [Mac Automation Scripting Guide: Manipulating Numbers](mac-automation-scripting-guide-manipulating-numbers.md): Working with and manipulating numbers is an important and regular occurrence in scripting. Basic mathematic operation... - [Mac Automation Scripting Guide: Using Handlers/Functions](mac-automation-scripting-guide-using-handlers-functions.md): Collections of script statements that can be invoked by name are referred to ashandlersin AppleScript,functionsormeth... - [Mac Automation Scripting Guide: About Scripting Terminology](mac-automation-scripting-guide-about-scripting-terminology.md): AppleScript and JavaScript possess core language commands, classes, and properties that make scripting possible. For ... - [Mac Automation Scripting Guide: Prompting for a Color](mac-automation-scripting-guide-prompting-for-a-color.md): Use the Standard Additions scripting addition’schoose colorcommand to ask the user to select a color from a color p... - [Mac Automation Scripting Guide: Using the Systemwide Script Menu](mac-automation-scripting-guide-using-the-systemwide-script-menu.md): The OS X script menu provides quick access to your collection of scripts. Simply select a script in the menu at any ... - [Mac Automation Scripting Guide: Getting to Know Script Editor](mac-automation-scripting-guide-getting-to-know-script-editor.md): Script Editor, found in/Applications/Utilities/, is an app for writing AppleScripts and JavaScripts. It provides the ... - [Mac Automation Scripting Guide: Encoding and Decoding Text](mac-automation-scripting-guide-encoding-and-decoding-text.md): A standard practice when creating URL's is to encode spaces and special characters (high-level ASCII) to hexadecimal ... - [Mac Automation Scripting Guide: Displaying Dialogs and Alerts](mac-automation-scripting-guide-displaying-dialogs-and-alerts.md): Dialogs and alerts are great ways to provide information about a script’s progress, report problems, and allow user... - [Mac Automation Scripting Guide: Prompting for a File Name](mac-automation-scripting-guide-prompting-for-a-file-name.md): Use the Standard Additions scripting addition’schoose file namecommand to display a save dialog that lets the user ... - [Mac Automation Scripting Guide: Prompting for Files or Folders](mac-automation-scripting-guide-prompting-for-files-or-folders.md): It’s generally good practice to avoid hard-coding file and folder paths in a script. Prompting the user to select f... - [Mac Automation Scripting Guide: Calling Command-Line Tools](mac-automation-scripting-guide-calling-command-line-tools.md): In AppleScript, thedo shell scriptcommand is used to execute command-line tools. This command is implemented by the S... - [Mac Automation Scripting Guide: Speaking Text](mac-automation-scripting-guide-speaking-text.md): Spoken text is another way to provide feedback to users during script execution; instead of reading a message visuall... - [Mac Automation Scripting Guide: Types of Scripts](mac-automation-scripting-guide-types-of-scripts.md): There are many different types of scripts on the Mac. - [Mac Automation Scripting Guide: Document Revision History](mac-automation-scripting-guide-document-revision-history.md): This table describes the changes toMac Automation Scripting Guide. - [Mac Automation Scripting Guide: Working with Property List Files](mac-automation-scripting-guide-working-with-property-list-files.md): Many apps store settings in property list files (also called plists). Scripts can also store and retrieve data in pli... - [Mac Automation Scripting Guide: Using Script Libraries](mac-automation-scripting-guide-using-script-libraries.md): A script library is a collection of handlers, which can be loaded and used by other scripts. For example, a scripter ... - [About Handlers](about-handlers.md): When script developers want to factor and re-use their code, they can turn to handlers. A handler is a collection of ... - [Folder Actions Reference](folder-actions-reference.md): Folder Actions is a feature of macOS that lets you associate AppleScript scripts with folders. A Folder Action script... - [Class Reference](class-reference.md): Aclassis a category for objects that share characteristics. AppleScript defines classes for common objects used in Ap... - [Commands Reference](commands-reference.md): This chapter describes the commands available to perform actions in AppleScript scripts. For information on how comma... - [Handler Reference](handler-reference.md): This chapter provides reference for handlers, which are defined and introduced inAbout Handlers. It describes the typ... - [Working with Errors](working-with-errors.md): This appendix provides a detailed example of handling errors withtry Statementsanderror Statements. It shows how to u... - [Operators Reference](operators-reference.md): This chapter describes AppleScript operators. Anoperatoris a symbol, word, or phrase that derives a value from anothe... - [Variables and Properties](variables-and-properties.md): Variables and properties are introduced in previous chapters in this document. You use them inscriptobjects to store ... - [Reference Forms](reference-forms.md): This chapter describes AppleScript reference forms.Areference formspecifies the syntax for identifying an object or g... - [AppleScript Lexical Conventions](applescript-lexical-conventions.md): This chapter provides an overview of the vocabulary and conventions of the AppleScript Language. It starts with the c... - [AppleScript Fundamentals](applescript-fundamentals.md): This chapter describes basic concepts that underlie the terminology and rules covered in the rest of this guide. - [Script Objects](script-objects.md): This chapter describes thescriptobject, which is used to implement all AppleScript scripts. Before reading this chapt... - [Control Statements Reference](control-statements-reference.md): This chapter describes AppleScript control statements. Acontrol statementis a statement that determines when and how ... - [Double Angle Brackets](double-angle-brackets.md): When you type English language script statements in a Script Editor script window, AppleScript is able to compile the... - [Error Numbers and Error Messages](error-numbers-and-error-messages.md): This appendix describes error numbers and error messages provided by AppleScript and macOS. - [Open Scripting Architecture](open-scripting-architecture.md): TheOpen Scripting Architecture (OSA)provides a standard and extensible mechanism for interapplication communication i... - [Libraries using Load Script](libraries-using-load-script.md): OS X Mavericks v10.9 (AppleScript 2.3) introduces built-in support for script libraries, which are scripts containing... - [AppleScript Keywords](applescript-keywords.md): This appendix lists AppleScript keywords (orreserved words), provides a brief description for each, and points to rel... - [Scripting with AppleScript](scripting-with-applescript.md): The following is a brief introduction to AppleScript scripts, tools for working with them, and information on using A... - [Scriptable Applications](scriptable-applications.md): Ascriptable applicationis one that goes beyond the basics of responding to Apple events sent by the Mac OS to make it... - [About AppleScript](about-applescript.md): AppleScriptis a scripting language that provides direct control of scriptable applications and scriptable parts of th... - [AppleScript Utilities and Applications](applescript-utilities-and-applications.md): Apple provides a number of utilities and applications in OS X to enhance the features of AppleScript and your scripts... - [Default Coercion Handlers](default-coercion-handlers.md): Important:This document may not represent best practices for current development. Links to downloads and other resour... - [Introduction to Apple Events Programming Guide](introduction-to-apple-events-programming-guide.md): Important:This document may not represent best practices for current development. Links to downloads and other resour... - [Responding to Apple Events](responding-to-apple-events.md): Important:This document may not represent best practices for current development. Links to downloads and other resour... - [Writing and Installing Coercion Handlers](writing-and-installing-coercion-handlers.md): Important:This document may not represent best practices for current development. Links to downloads and other resour... - [Unsupported Terms](unsupported-terms.md): This appendix lists scripting terms that are not supported by AppleScript. Though you may see these terms in a dictio... - [Introduction to XML-RPC and SOAP Programming Guide](introduction-to-xml-rpc-and-soap-programming-guide.md): Important:This document may not represent best practices for current development. Links to downloads and other resour... - [Automator](automator.md): Automator is a workflow automation application, first available in OS X version 10.4. Automator, which is located in/... - [Scripting Bridge](scripting-bridge.md): Scripting Bridge, introduced in OS X version 10.5, provides an automated process for creating an Objective-C interfac... - [Creating and Sending Apple Events](creating-and-sending-apple-events.md): Important:This document may not represent best practices for current development. Links to downloads and other resour... - [Building an Apple Event](building-an-apple-event.md): Important:This document may not represent best practices for current development. Links to downloads and other resour... - [About Apple Events](about-apple-events.md): Important:This document may not represent best practices for current development. Links to downloads and other resour... - [Apple Event Dispatching](apple-event-dispatching.md): Important:This document may not represent best practices for current development. Links to downloads and other resour... - [Introduction to AppleScript Overview](introduction-to-applescript-overview.md): Important:This document is no longer being updated. For the latest information about Apple SDKs, visit thedocumentati... - [Document Revision History](document-revision-history.md): Important:This document may not represent best practices for current development. Links to downloads and other resour... - [Selected Apple Event Constants](selected-apple-event-constants.md): Important:This document may not represent best practices for current development. Links to downloads and other resour... - [Working With the Data in an Apple Event](working-with-the-data-in-an-apple-event.md): Important:This document may not represent best practices for current development. Links to downloads and other resour... - [Testing and Debugging Apple Event Code](testing-and-debugging-apple-event-code.md): Important:This document may not represent best practices for current development. Links to downloads and other resour... - [Selected Apple Event Manager Functions](selected-apple-event-manager-functions.md): Important:This document may not represent best practices for current development. Links to downloads and other resour... - [Making Remote Procedure Calls From Applications](making-remote-procedure-calls-from-applications.md): Important:This document may not represent best practices for current development. Links to downloads and other resour... - [Glossary](glossary.md): - absolute object specifierAn object specifier that has enough information to identify an object or objects uniquely.... - [About AppleScript’s Support for XML-RPC and SOAP](about-applescript-s-support-for-xml-rpc-and-soap.md): Important:This document may not represent best practices for current development. Links to downloads and other resour... - [Making Remote Procedure Calls From Scripts](making-remote-procedure-calls-from-scripts.md): Important:This document may not represent best practices for current development. Links to downloads and other resour... - [Index](index.md): SymbolsABCDEFGHIKLMNOPQRSTUVWY