Page 1 of 1

Question - Passing Variables to AppleScript

PostPosted: Thu Feb 13, 2014 3:32 am
by Jon
I'm updating my Hazel Rules for storing paperless documents. In version 1, I wrote AppleScripts for each document to parse the values of Dates, Order#s, etc. Each of these scripts also changed the file dates to the date parsed from the file.

In version 2, I am replacing the parsing done with the AppleScripts with contents pattern matching. In the Tips & Tricks Forum, I saw the post about passing values by renaming the file to a string of the values and the AppleScript would retrieve the file name and parse the values.

The other morning, I had the idea of adding the values to the file as tags. At this time, I don't think AppleScript is able to retrieve tags. Using the XATTR and TOUCH commands in a shell script, I should be able to change the file dates.

Are there anything I should watch out for? Any thoughts or ideas?

Edited:

Re: Question - Passing Variables to AppleScript

PostPosted: Fri Feb 14, 2014 4:31 pm
by Mr_Noodle
I guess that's worth a try. Or you could try using the file's comments, which you can access via AppleScript.