Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'It can also mount .smi and .img images' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
It can also mount .smi and .img images
Authored by: Gwenhiver on Jun 11, '02 12:11:55PM
hdiutil can also mount .smi and .img disk images. A revised script can be seen at the end of this page. I know the site's in French, but I'm sure you'll be able to pick the AppleScript part up… ;-) (I can't just update it here, because GeekLog eats my anti-slashs…)

[ Reply to This | # ]
perhaps make it a droplet
Authored by: garbanzito on Jun 14, '02 03:14:17AM

nice idea. another approach would be to make it a droplet. also "quoted form" will be more flexible with odd characters in the file name. save as a stay open application to avoid having to wait for the droplet to launch:

-- if files dragged on
on open (the_files)
repeat with a_file in the_files as list
if {".dmg", ".smi", ".img"} contains (text -4 through -1 of (a_file as string)) then
do shell script "hdiutil mount " & quoted form of POSIX path of a_file
end if
end repeat
end open

-- if user double-clicks
on run
set f to (choose file with prompt "choose an image to mount") as list
open (f)
end run



[ Reply to This | # ]