Skip to main content
Automator & AppleScript

Automator & AppleScript #

For anyone who wants to learn this particular art, please read first:
Daring Fireball: The English-Likeness Monster

My OS version is macOS 10.15. Things may have changed in newer versions.

Type: Quick Action workflow

on run {input, parameters}
    set thePath to POSIX path of input
    set the clipboard to "file://" & thePath as text
end run

Copy link of file usage

Word count #

Type: Service

Ref: How to Set Up a System-Wide Word Count Service on Your Mac - MacRumors

echo "Words: (-w)"
echo $1 | wc -w
echo "Bytes: (-c)"
echo $1 | wc -c
echo "Characters: (zh -m)"
echo $1 | LANG="zh_CN.UTF-8" wc -m

Word count usage

Ref: macos - Quick way to create a symlink? - Ask Different