- Code: Select all
- #don't forget that theFile is the variable for the file
 set theDialogText to "This is where you are going to list instructions for the rule."
 set theButtonIfPressedTheRuleWillContinue to "Continue with Rule"
 set theButtonIfPressedRuleAborts to "Abort Rule"
 set theDialogTitle to "Advanced Hazel Sorting"
 ############## This is where the magic happens ############
 tell application "System Events"
 activate
 set theResult to button returned of (display dialog theDialogText with title theDialogTitle buttons {theButtonIfPressedTheRuleWillContinue, theButtonIfPressedRuleAborts} default button 1 giving up after 60 with icon (POSIX file (POSIX path of (get path to library folder from user domain) & "/PreferencePanes/Hazel.prefPane/Contents/Resources/PrefPane.icns" as string) as string) as alias) as string
 end tell
 if theResult is theButtonIfPressedTheRuleWillContinue then return true
 return false
EDIT: Changed "beta" to "3.0"
EDIT 2: Updated the icon path
 Would love to see an example on how to set this up in a rule for creating new sorting directories on the fly.
 Would love to see an example on how to set this up in a rule for creating new sorting directories on the fly.