Usage Report by email of alternative?

I am trying to set up a Hazel Rule that will notify me what applications have not been opened in the last 3 months and have got stuck”not surprising! At the moment my Hazel rule is:

If any of the following is before This Quarter
Do the following.Run AppleScript embedded script

The script is:

tell application “Mail”
set theNewMessage to make new outgoing message with properties {subject:“Hello from your Mac!”, content:“These Application have not been used recently”, visible:true}
tell theNewMessage
make new to recipient at end of to recipients with properties {address:“name@xxx.co.uk”}
send
end tell
end tell

The script works well as does the rule and I get loads of emails with the same message. What I want to do is to identify the actual applications that have not been opened but have no idea how to achieve this.

I have just had a thought that I do not mind if instead of an email being sent, a text usage report is produced, it would just as well.

Any genius out there who could help me please?
(Note I am also posting this in a Hazel forum)

Thanks.

It looks like you’ll have to switch to an external script. External scripts are written like handlers/subroutines:

on hazelProcessFile(theFile)
	
	-- Add your logic here.
	-- 'theFile' is an alias to the file that matched.
	-- Make sure to throw errors if you do not want Hazel
	--   to consider this action to have run successfully.
	
end hazelProcessFile

That snippet is straight from Hazel’s Help.

Thanks for this.