Back to Blog

AppleScript and Finder Automation - macOS Power You Are Not Using

Fazm Team··2 min read
applescriptfindermacosautomationscripting

AppleScript and Finder Automation - macOS Power You Are Not Using

A thread about forcing modern Finder back to spatial Mac OS 9-like behavior using AppleScript reminded everyone of something important: macOS has incredibly deep automation built in, and most people never touch it.

AppleScript has been around since 1993. It is not trendy. The syntax reads like someone tried to make code look like English and ended up somewhere in between. But it can do things that no other automation tool can match on macOS.

What AppleScript Can Actually Do

Every scriptable Mac app exposes a dictionary of objects and commands. Finder, for example, lets you manipulate windows, files, folders, selections, and views programmatically. You can set a Finder window to open at a specific size and position every time. You can make folders always open in new windows instead of replacing the current one. You can sort files, change view modes, and set label colors - all from a script.

Beyond Finder, apps like Mail, Safari, Calendar, Notes, and Terminal are all scriptable. You can chain actions across apps: "take the selected email, extract the attachment, save it to a specific folder, and open it in Preview."

Login Items and Persistent Automation

One underrated feature is combining AppleScript with Login Items. You can create small scripts that run automatically when you log in - setting up your workspace, opening specific apps in specific positions, connecting to VPNs, mounting network drives. This turns your Mac into a workspace that configures itself.

Where AI Agents Fit In

Modern AI agents on macOS can generate and execute AppleScript on the fly. Instead of you writing the script, you describe what you want and the agent writes and runs it. This combines the flexibility of natural language with the precision of AppleScript's deep system integration.

The accessibility API layer adds another dimension. Even apps that are not formally scriptable can be controlled through their UI elements - buttons, menus, text fields - using the same framework that powers VoiceOver.

macOS has had powerful automation for decades. AI agents are finally making it accessible to everyone.

Fazm is an open source macOS AI agent. Open source on GitHub.

Related Posts