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: Fri, 23 Mar 2018 10:48:21 +1100
G’day again.
This is exciting. So close, obviously.
My present procedure is….
1. Create a 40 MB disk image using Disk Utility.
2. Set the background of the .open .dmg to a prepared image.
3. Drag in my .app, and size and position icon as required in .dmg. Remove
sidebar etc. Close window.
4. Run the script.
5. Compress the hopefully altered .dmg.
6. Double click the compressed image.
7. It shows in the sidebar of a Finder Window, but does not mount the .dmg to
show .dmg window, so fail.
Is there anything wrong with this procedure, please?? Do I need the .dmg at
root level before running the script??
Regards
Santa
> On 23 Mar 2018, at 10:28 am, Paul Scott <email@hidden> wrote:
>
> The term smart-quotes refers to the left- and right-leaning quotes (or
> apostrophes) that are outside the normal ASCII range. A normal ASCII quote ha
> a value of 0x22 and a normal ASCII apostrophe has a value of 0x27. Those are
> the ones you need with “do shell script” otherwise you’ll run into problems.
>
> Ed’s example AppleScript uses “quoted form of POSIX path of myFIle” which
> surrounds the path with appropriate ASCII apostrophes (quoted form of) so
> that you don’t have to worry about it.
>
> Yes, what you have works. I even tested it against a .dmg file on my system,
> which became suitably mounted.
>
> Paul
>
>> On Mar 22, 2018, at 4:16 PM, Brian Christmas <email@hidden
>> <mailto:email@hidden>> wrote:
>>
>> G’day Paul & Ed
>>
>> Thank you for the suggestions to both, but especially for the code, Ed.
>>
>> My altered-as-per-script .dmg, which I then compress, does NOT auto mount on
>> decompression!
>>
>> Paul, I’ve read the man pages, but I noticed your footnote about smart
>> quotes. Not sure what that means? Is my altered-from-Eds code OK please?
>>
>> Regards
>>
>> Santa
>>
>> set myFile to (choose file) as alias
>> set myPath to quoted form of POSIX path of myFile
>>
>> set shellScript to "hdiutil attach -noverify -noautofsck -mount required " &
>> myPath
>>
>> do shell script shellScript
>> shellScript
>> --> "hdiutil attach -noverify -noautofsck -mount required
>> '/Users/OzSanta/Documents/My XCode Projects/AA Sierra Public/Web Site
>> stuff/Art Archiver.dmg’"
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> AppleScript-Users mailing list (email@hidden
> <mailto:email@hidden>)
> Help/Unsubscribe/Update your Subscription:
> Archives: http://lists.apple.com/archives/applescript-users
> <http://lists.apple.com/archives/applescript-users>
>
> This email sent to email@hidden <mailto:email@hidden>
_______________________________________________
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