Hazel 3.0 Hint: Multi-Use Applescript Dialog for Option Rule

Here is a quick little script I've been using for Hazel 3.0. Add a script-result applescript. This will give you a dialog box with any text you want. It also has the hazel icon!
EDIT: Changed "beta" to "3.0"
EDIT 2: Updated the icon path
- 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