
Here's my problem - I have 5 file names:
- blue.bright.bubble.big
burn.rot.red.reason
yield.yolk.yard.yawn.yellow
green.glow.garden.grass.gallop
only.onyx.open.orange.oscar
I could sort these files in any number of ways but for convenience's sake, I'd like to say that I need them to be compared to a list. If they match the items on that list -> actions are run. So in (embedded) Applescript, I would make a list and say (essentially):
- Code: Select all
set theList to {"red", "yellow", "green", "blue", "orange"}
I would then repeat through that list, returning each item to hazel for use later. I could also do my comparison directly in the embedded AppleScript and return "true" or "false". My problem is: is I'd like to keep my code as short as possible. I would also like to avoid doing my comparisons directly in the script itself.
Hopefully I'm not unclear, or am not blamed for reading something I should have (I scour the forums and constantly reread the user guide). So I apologize in advanced if I missed some answers related to these questions:
- 1. Am I better off doing my comparisons in Applescript or let Hazel handle them?
2. If I did want to return (individual) list items from (embedded) Applescript - do I need to add the variable list name or each specific item attribute I am exporting to the custom attributes window (right side)?
3. Is it even worth my time to write out (embedded) Applescript lists if a potential update around the corner incorporates lists and list items?
4. I am looking on potentially upgrading my Mac soon - I'd like the transition to be somewhat painless as far as backing up Hazel rules - then adding it to future Macs ensuring it works "out of the box" (so to speak). With this in mind, what can I do to help ease the transition considering questions 1-3?
(also, it's currently late where I am located. I apologize if my babble is incoherent)