I’m struggling to figure out the format for setting a path to an external script.
What I want to do is set a Smart Rule that looks for invoices that aren’t marked as “paid”, and have it set a Reminder on that invoice, with the Alarm set as “Execute External Script” and the external script set to an AppleScript I have saved in the appropriate folder (~/Library/Application Scripts/com.devon-technologies.think3/Reminders/Unpaid Invoice.scpt).
The script I have set for the Smart Rule is:
on performSmartRule(theRecords)
tell application id "DNtp"
set due_date to current date
set due_date to due_date + 3600 * 24 * 7
repeat with theRecord in theRecords
tell theRecord to make new reminder with properties {schedule:once, alarm:external script, alarm string:"Macintosh HD:Users:lnelson:Library:Application Scripts:com.devon-technologies.think3:Reminders:Unpaid Invoice.scpt", due date:due_date}
end repeat
end tell
end performSmartRule
I’ve tried formatting the alarm string:path-to-script as many different ways as I can imagine and I still can’t figure out how to properly get it to set the “Unpaid Invoice” script as the external script.
Can someone show me what I’m doing wrong? I’ll be your best friend forever.