Re: Toast
Re: Toast
- Subject: Re: Toast
- From: "J. Stewart" <email@hidden>
- Date: Wed, 8 Nov 2006 18:53:12 -0500
On 11/8/06 at -0000 Ruth Bygrave said this
>Anyone know how to set up Toast to do disc images?
Why Toast, it isn't needed for this. What you want is probably the shell command "hdiutil". Here's the description from the manpage -
DESCRIPTION
hdiutil uses the DiskImages framework to manipulate disk images. Common
verbs include attach, detach, verify, create, convert, and burn.
The rest of the verbs are: help, info, load, checksum, chpass, eject
(historical synonym for detach), flatten, unflatten, imageinfo, mount
(historical synonym for attach), mountvol, unmount, plugins,
internet-enable, resize, segment, compact, makehybrid, and pmap.
>I want to choose a base 'Uncompressed' folder full of folders, and a
>base 'Compressed' folder full of disc images, and the script will go
>through the Uncompressed folder, and if it finds any folders that
>don't have a corresponding compressed image, make one.
this isn't too difficult
>I create a Mac-only disc image first, to compress it, and then burn
>that to disc eventually. I'm not so interested in scripting burning
>the disc, because that requires user intervention anyway, putting the
>disc in. It would be very useful to be able to set the creation of
>compressed images going as a batch, though, because that might well
>run overnight with no intervention required.
>
>I looked at the dictionary for Toast, and cannot figure out what
>properties to use to choose 'compressed' and 'mac only', as most of
>the settings seem to be to do with video DVDs rather than data.
>
>Then I Googled for it, but couldn't find any examples of 'how to
>create a disc image in Toast' that I could cannibalise, although I
>found somebody asking for help with this.
>
>Probably obvious question 1)
>
>Tried:
>set myDisc to (make new disc with properties {name:theName})
>s\
>Probably obvious question 3)
>How do I prepare the disc? When I create it, is that like the
>ordinary Toast window, and I then add files to it and use the 'write'
>command to burn the disc?
Here is a script that creates a dmg from a folder. It isn't exactly what you asked for but I think you will see why I sent it when you try it. Given a folder, it creates a dmg file containing the folder's contents. As always be careful of line wrapping.
--> Cut <--
-- JBS - DMGfromFolder
set fp to choose folder with prompt "Choose a folder"
tell application "Finder" to set fn to name of fp
set fp2 to (do shell script "dirname " & quoted form of POSIX path of fp) & "/"
set fp3 to (do shell script "hdiutil create -srcfolder " & quoted form of (POSIX path of fp) & " " & (quoted form of (fp2 & fn & ".dmg")))
display dialog "Make internet enabled dmg?" buttons {"No", "Yes"} default button 2
if button returned of result is "Yes" then
set fp3 to last paragraph of fp3
set {oldDelims, my text item delimiters} to {my text item delimiters, {": "}}
set fp3 to text item 2 of fp3
set my text item delimiters to oldDelims
-- set fp3 to POSIX file fp3
do shell script "hdiutil internet-enable -yes " & fp3
end if
--> Cut <--
JBS
--
Ever wonder what the speed of lightning would be if it didn't zigzag? - George Carlin
_______________________________________________
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/mailman//archives/applescript-users
This email sent to email@hidden
References: | |
| >Toast (From: Ruth Bygrave <email@hidden>) |