I wrote a new e-book with AppleScript. PDF 74 pages (In Japanese).
https://piyomarusoft.booth.pm/items/6309526
On a daily basis, we acquire the selected object in a document or window of a GUI application on macOS, process it with AppleScript based on that information, and reflect it in the original selected object.
If you can write it like this, it looks as if you are extending the functionality of the GUI application with AppleScript. Even if the process is actually performed externally, it can behave as if it is expanding in terms of usability.
In some ways, it’s the strongest feature that AppleScript has to offer. In this book, we will introduce a wide range of this powerful selection function, from its overview to examples and points to note.
Table Of Contents:
■ First: Make sure to turn off Stage Manager first on macOS 13 or later
macOS 13.x
macOS 14.x
macOS 15.x
Other features that you might want to turn off
■ Reserved word “selection” to access the selected object on the app
Know the selected object on the GUI app
The selected object is It’s not just one
You can also process the selected object.
Analyzing Information on Selected Objects
■ Processed by other applications based on the information of the selected object
List of apps that support selection functions
Apps with reserved words that include select and reserved words (1)
Apps with reserved words that include select and reserved words (2)
Apps with reserved words that include select and reserved words (3)
■ Main examples of selection
How to get selection (Finder)
Rewriting selection (Finder)
How to get a SELECTION (Contacts)
Rewriting Selection (Contacts)
How to get selection (Keynote)
Rewriting selection (Keynote)
How to get selection (Music)
Rewriting Selection (Music)
How to get selection (CotEditor)
Rewriting selection (CotEditor)
How to get selection (Numbers)
How to get an active sheet (Numbers)
How to get selection range (Numbers)
Rewrite cell contents of selection range (Numbers)
How to get selection (Excel)
How to get the selected worksheet (Excel)
Rewriting selection (Excel)
How to get selection (Pixelmator Pro)
Explanation of reserved words including select- (1) (Pixelmator Pro)
Explanation of reserved words with select- (Pixelmator Pro)
Examples of commands including select- (Pixelmator Pro)
Example of a command containing select- (Pixelmator Pro)
■Points to note when using SELECTION
Note 1: Be careful when passing a large number of objects
Note 2: In some cases, it takes time to write back information.
Note 3: Determine the type of selected object
We also offer a variety of other e-books.