osx - Applescripting a Reminder as an add- folder action -


i'm new applescript want set folder action that:

1. recognises when file added folder 2. tags said folder red 3. adds reminder "downloads" reminder list has name of newly-added file body text of reminder 

using google , applescript's record function i've frankenscripted far

property dialog_timeout : 30 -- set amount of time before dialogs auto-answer.  on adding folder items this_folder after receiving added_items    try     tell application "finder"         set filename name of (added_items)         set label index of folder "untitled folder" of folder "desktop" of folder "heyjeremyoates" of folder "users" of startup disk 2     end tell      tell application "reminders"         set mylist list "downloads"         tell mylist             make new reminder properties {name:"d/l complete", body:filename, due date:(current date)}         end tell     end tell end try  end adding folder items 

darn thing won't work. infuriating. tested folder action "test" name , body of reminder , worked fine. i'm pretty sure i've gone wrong somewhere in setting filename name of newly copied item because script no longer turns folder red.

the idea behind can see, iphone/ipad, how many large/scheduled downloads home mac (both torrents , large work files - i'll have seperate folder action , reminder list each download folder) there are yet managed.

it seemed setting growl/prowl combo wasteful if icloud/reminders , dozen lines of code deliver wanted anyway. ideally i'll write second applescript delete reminder when rename or move related file, , though haven't thought how work if has suggestions i'd super grateful

it pity can't (natively) have osx notifications pushed ios device linked same icloud account though (with appropriate granularity)

but digress - can see i'm screwing here?

thanks in advance reading far

added_items list of aliases, , name of (added_items) resulted in error.

on adding folder items this_folder after receiving added_items     tell application "finder"         set label index of this_folder 2         repeat f in added_items             set n name of f             tell application "reminders" tell list "downloads"                 make new reminder properties {name:"d/l complete", body:n, due date:(current date)}             end tell         end repeat     end tell end adding folder items 

(save script in ~/library/workflows/applications/folder actions/ , enable folder action folder actions setup.)


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -