Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Determining what AppleScript commands an application responds to

Is it possible to ask an OSX application which applescript commands it responds to, and if so, how?

like image 312
andrewdotnich Avatar asked Aug 07 '10 11:08

andrewdotnich


People also ask

What is AppleScript based on?

AppleScript is a scripting language developed by Apple Inc. for the Macintosh operating system. It is commonly used for programming using common gateway interfaces with Macintosh-based Web servers. It is an “English-like” scripting language that is easy to use and understand.

What script does Apple use?

AppleScript is a scripting language created by Apple. It allows users to directly control scriptable Macintosh applications, as well as parts of macOS itself.

What are Mac scripts?

About Mac Scripting. 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 statements, each of which performs a specific operation. These statements work together to automate tasks.


1 Answers

You need to look at the Dictionary for an application to see all of the classes and commands the application supports. To get to an application's Dictionary in the the Applescript Editor go to File > Open Dictionary.... A list of all the applications that the OS knows supports Applescript will appear, but the OS won't catch them all so you can use the Browse button. If an application doesn't support Applescript, then it won't be selectable in the dialog window.

The caveat to this is that there are certain commands that an application is supposed to support but don't, or an application may only support the minimum requirements. These are all very, very simple like open, quit, etc. Your mileage may vary.

like image 139
Philip Regan Avatar answered Sep 17 '22 11:09

Philip Regan