Using applescript to generate email response

Talk, speculate, discuss, pontificate. As long as it pertains to Hazel.

Moderators: Mr_Noodle, Moderators

Using applescript to generate email response Thu Jun 06, 2019 2:10 pm • by lynwyn
Hi. I set up rules to generate an notification email when images are added to a folder. However, it generates one email per image, and I only want it to send one per batch of images. Any suggestions?
lynwyn
 
Posts: 7
Joined: Thu May 16, 2019 4:16 pm

How do you define a batch? If it's all the images in a folder, you can instead match that folder (you'll need to have Hazel monitor the folder that contains it).
Mr_Noodle
Site Admin
 
Posts: 7865
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

I wanted it to be all the newly added images, however, I generate images into a temporary folder that Hazel monitors and then moves to the appropriate final folder when rules are matched. I assume if I do the correct order of the rules, this can work from the temp folder?
lynwyn
 
Posts: 7
Joined: Thu May 16, 2019 4:16 pm

Note that Hazel has no notion of what you consider a batch. If it's every file in a particular folder, how would you know whatever is generating the files is done? Can you go off of some delay after the last time a file was added? Is there some other indicator you can use?
Mr_Noodle
Site Admin
 
Posts: 7865
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Batches take less than 10 minutes to create and occur once a day. It's not clear to me how to break this out so it only send one email. It would be nice, but it sounds like perhaps it is not capable of being done.
lynwyn
 
Posts: 7
Joined: Thu May 16, 2019 4:16 pm

If it's once a day, you could use "Current time" to schedule it.
Mr_Noodle
Site Admin
 
Posts: 7865
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Open Discussion

cron