AppleScripts
My collection of AppleScripts I've developed or acquired over the years.
Install / Use
/learn @kevin-funderburg/AppleScriptsREADME
My AppleScripts
Collection of AppleScripts I've developed or acquired over the years. Some are great as standalone scripts while others are great for incorporation with others.
<!--<details> <summary><strong>Table of Contents</strong> (click to expand)</summary> --> <!-- TOC depthFrom:2 --> <!-- /TOC --> <!-- </details> -->This repo is in continuous development and will be updated as scripts are developed (and as I have time).
<a id="about"></a>
About
This repo was created for two main reasons.
- Provide others with useful scripts for automating their workflow on macOS.
- As a tool for AppleScript education by providing example scripts, tools, tips and AppleScript resources.
With some exceptions, almost all these scripts are executable by themselves via the [Script Menu][klsie781]. However, I generally turn to third party automation apps to execute them, including [Keyboard Maestro][kmapp], [Alfred][alfredapp], [BetterTouchTool][bttapp] and [Hazel][hazelapp].
-
Notes on formatting For those who are unaware, the standard file format for AppleScripts is
.scptor.scptd, but these file types are not readable on GitHub, so for readability's sake, all these scripts have been exported as a.applescriptfile (which is just a text file). So if you were wondering about the file type, this is the reason. -
Many of these scripts depend on this [script library][kevinslib] I developed, so if you see the following line at the top of the script, make sure you get that library and place it into
~/Library/Script Librariesotherwise the script is non-functional.
use kl : script "Kevin's Library"
Contents
I've divided the scripts into 3 sections:
- Application Scripts - Scripts designed for use in a specific application.
- Global Scripts - Scripts that are meant to be executed in any application.
- NOTE: There are scripts here that are specific to an application but are meant to executed globally, so the scripts in the Application Scripts section with the globe icon ( :earth_americas: ) next to them imply global scope for that specific application.
- Scripts for Script Development - These scripts are useful handlers that can be copied into scripts or into a script library that makes scripting much simpler.
Clicking the name of the script will show you the script directly, but make sure to view the README for each section by clicking the title of the section to see instructions/explanations/demos.
Although not needed, the shortcut keys I use to execute these via [Keyboard Maestro][kmapp] or [Alfred][alfredapp] are included in case your're interested
Application Scripts
| Application | Scripts | <i></i> | Shortcut Key | | -------------------------- | ------------------------------------------------- | ------------------------- | ------------------------------------------------ | | [Alfred][alf] | [Show Recent Files for Front App][a345fg38] | :earth_americas: :cinema: | <kbd>hyperkey</kbd><kbd>O</kbd> | | <i></i> | [Browse Current Workflow in Alfred][6274c240] | <i></i> | <kbd>⌘</kbd><kbd>R</kbd> | | <i></i> | <i></i> | <i></i> | <i></i> | | [BetterTouchTool][btt] | [BetterTouchTool Library][ej8172hf] | <i></i> | <i></i> | | <i></i> | <i></i> | <i></i> | <i></i> | | [Finder][finder] | [Copy Path as Alias][02e5746e] | <i></i> | <kbd>⌘</kbd><kbd>⌃</kbd><kbd>C</kbd> | | <i></i> | [Go to Custom Folder][fb40138e] | <i></i> | <kbd>too many to list</kbd> | | <i></i> | [Monthly Cleanups][2f34cbb7] | :camera: | <i></i> | | <i></i> | [Open Selection in iTerm][8fea9aa4] | :cinema: | <kbd>⌥</kbd><kbd>⇧</kbd><kbd>T</kbd> | | <i></i> | <i></i> | <i></i> | <i></i> | | [iTerm][iterm] | [Copy Text and Send to iTerm][9badd7b8] | :earth_americas: | <kbd>⌘</kbd><kbd>⌥</kbd><kbd>⌃</kbd><kbd>T</kbd> | | <i></i> | <i></i> | <i></i> | <i></i> | | [Keyboard Maestro][km] | [Edit Linked or In-Line AppleScript][3034f6a6] | :cinema: | <kbd>⌥</kbd><kbd>⇧</kbd><kbd>E</kbd> | | <i></i> | [Add|Remove Status Menu Trigger][8111e7c4] | <i></i> | <kbd>⌥</kbd><kbd>S</kbd> | | <i></i> | [Collapse All Desired Actions][a0794034] | :cinema: | <kbd>⌥</kbd><kbd>⌃</kbd><kbd>[</kbd> | | <i></i> | [Copy Macro's AppleScript Trigger][4945c497] | <i></i> | <kbd>⌘</kbd><kbd>⌃</kbd><kbd>C</kbd> | | <i></i> | [Edit Last Executed Macro][8265051f] | :earth_americas: | <kbd>⌃</kbd><kbd>⇧</kbd><kbd>E</kbd> | | <i></i> | [Edit Macro Group of Front App][bca5fefd] | :earth_americas: | <kbd>⌘</kbd><kbd>⌥</kbd><kbd>K</kbd> | | <i></i> | [Go To Executed Macro][4355277b] | <i></i> | <kbd>⌘</kbd><kbd>⌥</kbd><kbd>G</kbd> | | <i></i> | [Recursively Get Every Action][jf9jsn87] | <i></i> | <i></i> | | <i></i> | [Renumber Macro Prefix Numbers][7037aad4] | :camera: | <kbd>⌘</kbd><kbd>⌃</kbd><kbd>3</kbd> | | <i></i> | [Run Current Macro][8cbb891d] | :earth_americas: | <kbd>⌘</kbd><kbd>⌃</kbd><kbd>R</kbd> | | <i></i> | <i></i> | <i></i> | <i></i> | | [Mail][mail] | [Set Color of Text][d1529523] | :cinema: :camera: | <kbd>⌘</kbd><kbd>⇧</kbd><kbd>(C)olor</kbd> | | <i></i> | [Make Mail URL][63ba2f90] | <i></i> | <kbd>⌃</kbd><kbd>U</kbd> | | <i></i> | [Mark All Inbox Messages as Read][48cdab2f] | :earth_americas: | <i></i> | | <i></i> | [Show Message][9c348c76] | :earth_americas: :camera: | <i></i> | | <i></i> | <i></i> | <i></i> | <i></i> | | [Markdown][md] | [Insert Markdown Style Buttons][b89f4ac4] | :camera: | <kbd>⌥</kbd><kbd>H</kbd> | | <i></i> | <i></i> | <i></i> | <i></i> | | [OmniFocus][omnif] | [Push Due Date][c82d4171] | <i></i> | <kbd>⌥</kbd><kbd>D</kbd> | | <i></i> | [Set Duration][aaf5d91c] | <i></i> | <kbd>⌥</kbd><kbd>⇧</kbd><kbd>1-9</kbd> | | <i></i> | <i></i> | <i></i> | <i></i> | | [Safari][saf] | [Close Left Tab][6de3c825] | <i></i> | <kbd>⌥</kbd><kbd>[</kbd> | | <i></i> | [Close Right Tab][2f774cb3] | <i></i> | <kbd>⌥</kbd><kbd>]</kbd> | | <i></i> | [Duplicate Tab][74151e54] | <i></i> | <kbd>⌃</kbd><kbd>D</kbd> | | <i></i> | [Do Javascript Handler][3d850154] | <i></i> | <i></i> | | <i></i> | [Show|Create Tab][225bf283] | <i></i> | <i></i> | | <i></i> | <i></i>
