I have a sparse image that can be mounted as an encrypted volume. I want to make sure it doesn't stay mounted once I am done using it.
To get help doing that, I had earlier asked this question, but got no response.
So, I am asking this new, hopefully simpler question:
How can I do the following:
1) When the volume is mounted, a script should start running.
2) The script should ask even hour whether the volume should be unmounted, and depending on the response unmount the volume (If that is too complicated, this will suffice as well: The script should just attempt to unmount the volume, and indicate if the unmount failed due to the volume being in use)
3) The script should stop executing once the volume is unmounted (ideally by "listening" for its unmount event, or if that's not possible, simply as the next step in the script's execution once it has effected the unmount -- the former having the benefit that even a manual unmount would end the script)
I have only very recently moved to the Mac from Windows and have no experience with AppleScript. So, a working script would be ideal, but if I am given pointers on how to carry out the individual steps, I should be able to piece them together as well, hopefully.