Author Topic: using diskCopy to create ".smi" self mounting images using Applescript  (Read 10876 times)

supernova777

  • Guest
http://snippetcenter.org/en/create-self-mounting-image-from-disk-copy-image-s338.aspx

Description

There is a little known feature of Disk Copy: it can create a self-mounting image from a disk image generated by it. However this feature is accessible only by AppleScript and not from the GUI. Save the following script as an application (droplet) and drop an image file on it to generate the corresponding self-mounting image.

Code: [Select]
on open (imagefile)
set imagefile to imagefile as text
if imagefile ends with ".img" then
set len to length of imagefile
set smifile to (characters 1 thru (len - 4) of imagefile) & ".smi" as text
else
set smifile to imagefile & ".smi"
end if
tell application "Disk Copy"
create SMI file smifile source images file imagefile
end tell
end open

supernova777

  • Guest
getting an error.. -1302?

perhaps i need to visit http://macscripter.net/index.php for some help xD
this sucks! so close!! but . argh!!

http://support.apple.com/kb/TA24879?viewlocale=en_US#

Quote
AppleScripts that extend the functionality of Disk Copy, version 6.3 or greater. They are provided as examples of how to use AppleScript to control Disk Copy, and gain access to features not present in the user interface. Create self-mounting image will prompt the user to select a disk image, verify it, then let the user save it as a self-mounting image. AppleScripts can be executed directly from Disk Copy by placing them in a folder named 'Scripts' in the same folder as Disk Copy. When a Scripts folder containing AppleScripts is present, a new menu will appear in Disk Copy named "Scripts". AppleScripts selected from this menu will have their "on run" handler executed.

Floppy insert preferences will prompt the user to decide what action Disk Copy will take if a floppy disk is inserted while Disk Copy is the foreground application. The "Make an Image" button will result in the floppy being saved as a disk image, and the "Copy" button will result in the floppy being copied and restored onto another floppy. Segment Image will ask the user how they want to segment an image (by size or number of parts), prompt the user to select a disk image, verify it, then save the image segmented. Using the Script Editor or other AppleScript script editor, the contents of the scripts can be viewed.

This software consists of a self-mounting Disk Copy compressed image (.smi) file. Download this software to your hard drive and then double-click it to use it. You do not need Disk Copy to access smi files.

Note: Disk Copy 6.3 Scripts, released July 17, 1998 requires Disk Copy 6.3 or greater, and a Mac OS based computer with AppleScript installed.

http://download.info.apple.com/Apple_Support_Area/Apple_Software_Updates/English-North_American/Macintosh/Utilities/Disk_Copy/Disk_Copy_6.3_Scripts.smi.bin
« Last Edit: March 19, 2014, 05:38:00 AM by chrisNova777 »

supernova777

  • Guest
heres the script to "Save as Application"
can anyone help me make this work??

supernova777

  • Guest
in .sea format

supernova777

  • Guest
ok this seems to work alot easier:
http://macintoshgarden.org/apps/shrinkwrap

image > convert image "Self mounting image"

wonder why this applescript shit gave me that error.. ohwell.. i was stoked to be using applescript for a min there.. too bad it didnt end in success:(

supernova777

  • Guest
Re: using diskCopy to create ".smi" self mounting images using Applescript
« Reply #5 on: September 21, 2014, 11:56:20 AM »
Code: [Select]
on open (imagefile)
set filename to imagefile as text
if filename ends with ".img" then
set len to length of filename
set smifile to (characters 1 thru (len - 4) of filename) & ".smi" as text
else
set smifile to filename & ".smi"
end if
tell application "Disk Copy"
create SMI file smifile source images file imagefile
end tell
end open
ive altered the script here and wouldnt mind taking another crack at this
i think the error might have been caused by a stupid error of using the word imagefile twice to describe the file + the filename variable
which would have resulted in an error because i needed a unique name for the filename of the source file


supernova777

  • Guest
it would be great if some of u apple fans could try to help me fix this script...!!
it would of great use to all of us to be able to create drag n drop .smi files
wouldnt it?

https://support.apple.com/kb/TA24879?locale=en_CA&viewlocale=en_US
this document claims to create the SMI files u must have v6.3 or higher of disk copy version

Quote
Note: Disk Copy 6.3 Scripts, released July 17, 1998 requires Disk Copy 6.3 or greater, and a Mac OS based computer with AppleScript installed.

Offline MacTron

  • Global Moderator
  • Platinum Member
  • *****
  • Posts: 2116
  • keep it simple
Just curious: Why do you want to create a smi ?
Please don't PM about things that are not private.

supernova777

  • Guest
Just curious: Why do you want to create a smi ?

to easily create files that can be sent to other people and used immediatey with no fuss or trouble or bother
because its easy to use and universally supported on all mac os machines...
regardless of where the disk utility or which version of disk utility or stuffit version etc

u can do this with shrinkwrap like i figured out above in the thread... but i read that it could be done with only disk copy + a applescript
plus i wanted to see the working applescript...

i know there is some big differences between mac os 9 applescripts + mac os x applescripts

Offline MacTron

  • Global Moderator
  • Platinum Member
  • *****
  • Posts: 2116
  • keep it simple
SMI files were useful in the past, when Mac the file transfers usually don't had to go through alien systems (Unix, Windows etc).
Remember that smi files are real Mac Os Apps, and therefore, they shouldn't be transferred without further encoding ... so the smi format benefits are lost.
Please don't PM about things that are not private.

supernova777

  • Guest
Re: using diskCopy to create ".smi" self mounting images using Applescript
« Reply #10 on: March 11, 2015, 08:51:24 AM »
SMI files were useful in the past, when Mac the file transfers usually don't had to go through alien systems (Unix, Windows etc).
Remember that smi files are real Mac Os Apps, and therefore, they shouldn't be transferred without further encoding ... so the smi format benefits are lost.

i dont agree.
most of the reason why i dont agree is because of the fact that
.smi.bin was the preferred fileformat for software installer distribution directly from apple
also decoding this file results in a file that automatically mounts itself on the desktop in less clicks

Offline IIO

  • Platinum Member
  • *****
  • Posts: 4443
  • just a number
Re: using diskCopy to create ".smi" self mounting images using Applescript
« Reply #11 on: March 29, 2015, 09:55:42 AM »
...
insert arbitrary signature here

supernova777

  • Guest
Re: using diskCopy to create ".smi" self mounting images using Applescript
« Reply #12 on: March 29, 2015, 10:01:44 AM »
you corrected the script?