I don't know if Noodlesoft will implement this feature, but until they do, you can use this rule attached to your Trash folder.
The trash folder is in ~/.Trash, or the folder named .Trash in your home folder. You can add this folder to Hazel by pressing Cmd+Shift+G in Hazel's open folder dialog box when you're adding a folder and then typing in "~/.Trash" without the quotes.
The corresponding rule will match any file that has an extension of app (to workaround a bug that I think is in the current version of Hazel) and, upon matching, run an AppleScript. The contents of the embedded script are as follows:
- Code: Select all
try
tell application "System Events"
set theLoginItem to (every login item whose path is (POSIX path of theFile))
if (length of theLoginItem) is greater than 0 then
tell application "HazelHelper" to display dialog "Would you like to remove the login item for " & (do shell script "basename " & (POSIX path of theFile)) & "?" with icon 1 with title "Hazel"
delete first item of theLoginItem
end if
end tell
end try
Whenever this rule matches an application that has a login item attached to it, it will ask you if you want to remove that login item. If you confirm, then the corresponding login item will be removed.