temochka / macos-automation

A collection of my macOS automation scripts (Alfred Workflows, AppleScript, and JXA)
52 stars 7 forks source link

Applescript Error #1

Closed itsbrex closed 2 years ago

itsbrex commented 2 years ago

Hey tried running the make all command, but go this.

mkdir -p target/applescript;
mkdir -p target/apps;
mkdir -p target/cli;
mkdir -p target/hotkeys;
for dir in $(find applescript -mindepth 1 -maxdepth 1 -not -type f); do \
        mkdir -p target/applescript/$(basename $dir); \
    done
mkdir -p target/applescript;
for launcher in applescript/*/launcher.json; do \
        cp $launcher target/$launcher; \
    done
./applescript/meta_launcher.rb > target/applescript/meta_launcher.json
for script in applescript/*/*.applescript; do \
        dirname=$(dirname $script | sed -E s/.*\\///); \
        filename=$(basename $script | sed -E s/\.[^.]+$//); \
        echo $filename; \
        cat applescript/lib.applescript $script | osacompile -o target/applescript/$dirname/$filename.scpt; \
    done
fetch_contacts
compilation error: Expected end of line but found “from”. (-2741)
link_contact
compilation error: Internal table overflow. (-2707)
view_in_alfred
copy_note_url
extract_links
compilation error: Expected end of line but found “from”. (-2741)
fetch_notes
compilation error: Expected end of line but found “from”. (-2741)
link_note
move_notes
next_note
open_link
prev_note
selection_to_omnifocus
compilation error: Expected end of line but found identifier. (-2741)
today_note
copy_splunk_value
open_highlighted_link
fetch_events
fetch_links
link_event
open_link
search_events
copy_mail_message_url
fetch_tasks
compilation error: Expected “,” but found identifier. (-2741)
link_task
compilation error: Expected end of line but found class name. (-2741)
project_notes
compilation error: Expected end of line but found class name. (-2741)
time_block
compilation error: Expected end of line but found class name. (-2741)
make: *** [applescript-automation] Error 1
temochka commented 2 years ago

All scripts compile are known to compile on Big Sur. If you’re on Monterey (or any other macOS version), some things may be broken. I’ll upgrade to Monterey eventually and work through any issues.

Note that if you’re lacking an app required by a particular script, it won’t compile (this doesn’t prevent you from using other scripts). Additionally, many of my scripts require the JSON helper app from App Store.

P.S. It’s not my goal to provide any kind of support for this repo. It’s public only so that others can learn from the code. I’m offering these tips a friendly gesture. Otherwise, you’re on your own, good luck!