We Recommend

Beginning AppleScript (Programmer to Programmer) Beginning AppleScript (Programmer to Programmer)
Geared toward programmers with no prior development knowledge, Beginning AppleScript serves as a comprehensive guide to using AppleScript on the Mac OS X platform. This title introduces the reader to AppleScript, and then illustrates how to efficiently start writing scripts through sample programs as each concept is introduced.


Posted By

katz on 07/09/06


Tagged

applescript DiskImage


Versions (?)


Who likes this?

7 people have marked this snippet as a favorite

Roshambo
splorp
jpb
Caliban
kellyharding
Netzach
atr000


unmount disk image (*.dmg) file


Published in: AppleScript 


In this case, if we have mounted GyazMail.dmg, unmount it.

  1. tell application "Finder"
  2. if exists "GyazMail" then
  3. do shell script "hdiutil detach \"/Volumes/GyazMail\""
  4. end if
  5. end tell

Report this snippet 

You need to login to post a comment.