Page 1 of 1

Dialogue box upon rule match to determine file destination?

PostPosted: Mon Feb 20, 2012 8:35 pm
by mojoe2013
Hello,

Is there a way to create a rule in Hazel so that if a file with a file with a particular extension gets moved gets put into that folder that a dialogue box will be displayed which will allow me to choose where it should go?

An example would be if I download a PDF file. As soon as the PDF file is done downloading to my desktop, it triggers a Hazel script that then displays a dialogue box that reads something to the effect of "Move to Evernote folder or documents". The two options that I could click would read either "Evernote" or "Documents" and upon me clicking one would move the file there. I have a sneaky suspicion that Applescript may need to be involved (which I have no experience with) but wanted to see if Hazel could help me first.

Thanks!

Re: Dialogue box upon rule match to determine file destinati

PostPosted: Tue Feb 21, 2012 12:00 am
by Pe8er
Here is a start:

Code: Select all
display dialog "Where do you want to move this file?" buttons {"Cancel", "Evernote", "Documents"} default button 3
set the button_pressed to the button returned of the result
if the button_pressed is "Evernote" then
   -- action for 2nd button goes here
else if the button_pressed is "Documents" then
   -- action for 3rd button goes here
end if