Re: Auto mount .dmg in High Sierra? Possible??
Re: Auto mount .dmg in High Sierra? Possible??
- Subject: Re: Auto mount .dmg in High Sierra? Possible??
- From: Brian Christmas <email@hidden>
- Date: Sat, 24 Mar 2018 04:21:43 +1100
G’day all
I’m having ongoing problems getting a downloaded disk image to auto open after
the help I got yesterday.
I’ve written this script to set the procedure in stone, but it fails to save
the last file, which I PRESUME is in zipped format.
Anybody care to pick holes in the script, please??
Regards
Santa
set myFile to choose file of type {"dmg"} with prompt "Please select a disk
image to set the 'auto open' on :" #of type {".dmg"}
set myPath to quoted form of POSIX path of myFile
tell application "Finder" to set myname to name of myFile as text
set shellScript to "hdiutil attach -verify -autofsck -mount required " & myPath
do shell script shellScript
--> "hdiutil attach -noverify -noautofsck -mount required
'/Users/OzSanta/Documents/My XCode Projects/AA Sierra Public/Web Site stuff/Art
Archiver.dmg'"
set myFolder to choose folder with prompt "If desired, please select a new
folder in which to save a compressed version of the disk image, or Cancel :"
set folderPath to quoted form of POSIX path of ((myFolder as text) & myname &
".zip")
set shellScript2 to "hdiutil convert " & myPath & " UDZO -o " & folderPath #do
shell script shellScript2
-->hdiutil convert '/Users/OzSanta/Documents/My XCode Projects/AA Sierra
Public/Web Site stuff/Art Archiver.dmg' UDZO -o '/Users/OzSanta/Desktop/Art
Archiver.dmg.zip'"
shellScript & return & shellScript2
(*
UDRW - UDIF read/write image
UDRO - UDIF read-only image
UDCO - UDIF ADC-compressed image
UDZO - UDIF zlib-compressed image
ULFO - UDIF lzfse-compressed image (OS X 10.11+ only)
UDBZ - UDIF bzip2-compressed image (Mac OS X 10.4+ only)
UDTO - DVD/CD-R master for export
UDSP - SPARSE (grows with content)
UDSB - SPARSEBUNDLE (grows with content; bundle-backed)
UFBI - UDIF entire image with MD5 checksum
UDRo - UDIF read-only (obsolete format)
UDCo - UDIF compressed (obsolete format)
RdWr - NDIF read/write image (deprecated)
Rdxx - NDIF read-only image (Disk Copy 6.3.3 format;
deprecated)
ROCo - NDIF compressed image (deprecated)
Rken - NDIF compressed (obsolete format)
DC42 - Disk Copy 4.2 image (obsolete format)
*)
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden