2 ms·
If macOS has a DSL, it's AppleScript. AppleScript is a scripting language created by Apple. It allows users to directly control scriptable Macintosh applicatio
by CharlesW 4y ago
If macOS has a DSL, it's AppleScript.
AppleScript is a scripting language created by Apple. It allows users to directly control scriptable Macintosh applications, as well as parts of macOS itself. You can create scripts—sets of written instructions—to automate repetitive tasks, combine features from multiple scriptable applications, and create complex workflows.
set targetFolder to POSIX file "/Users/Me/Desktop/MyFolder"
tell application "Finder"
set finderFolder to item targetFolder
set lstTargets to target of every Finder window
if {finderFolder} is in lstTargets then
set target of (make new Finder window) to targetFolder
end if
end tell
That said, AppleScript is probably not long for this world. The future looks more like visual programming via Shortcuts.