
However, haven't been able to figure out how to get this rule done yet. Basically, I want to leave the DMG wherever it is but Eject it 1 hour after it was opened.
Ideas anyone?
Moderators: Mr_Noodle, Moderators
IDontDoWindows wrote:That's funny... I've been checking this thread off and on to see what you came up with ...
on hazelProcessFile(infile)
tell application "Finder" to set inFileName to name of infile as string
do shell script ("hdiutil detach '" & inFileName & "'")
end hazelProcessFile
on hazelProcessFile(infile)
tell application "Finder" to set inFileName to name of infile as string
do shell script ("hdiutil detach '" & inFileName & "'")
end hazelProcessFile
gerbercj wrote:Last post... really! I needed to replace "Date Last Matched" with "Date Added". Here's the final version:
If all of the following conditions are met
> Kind is not folder
> Date Added is not in the last 1 hour
Do the following:
> Run AppleScript eject.scpt
eject.scpt:
- Code: Select all
on hazelProcessFile(infile)
tell application "Finder" to set inFileName to name of infile as string
do shell script ("hdiutil detach '" & inFileName & "'")
end hazelProcessFile
Let me know if this works for folks... I haven't tested much as I need to get to bed.