#16
|
|||
|
|||
icon for sparseimage
The non-appearance of the new icon for the disk within the sparseimage is only temporary. This disk image with the wrong icon is still on the desktop ... when I eject the disk and then re-open the sparseimage, the new icon appears.
Not all wasted, however, because in the process of discovering this "feature" I developed a straight AppleScript to effect the same thing: ===== -- "set_icon_scpt.scpt" -- -- run after SuperDuper's 'Copy All Files to "iMac_Internal_DU"' property theSrc : "iMac Internal HD" property theDest : "iMac_Internal_DU" property ICONS : "Volume Icons" property theICON : ".VolumeIcon.icns" copyAllFiles(theSrc, theDest) on copyAllFiles(srcDisk, destDisk) tell application "Finder" activate set destDMG to destDisk & ".sparseimage" set iconFolder to folder ICONS in home set newIconFile to document file (destDisk & theICON) in iconFolder set restoreFolder to get original item of (item "Restore" in desktop) open information window of newIconFile tell application "System Events" keystroke tab keystroke "c" using command down delay 0.2 -- a tad extra time for copying to complete end tell close front window -- info window of newIconFile open document file destDMG of restoreFolder repeat until exists disk destDisk delay 0.2 end repeat open information window of disk destDisk tell application "System Events" keystroke tab keystroke "v" using command down delay 0.2 -- a tad extra time for pasting to complete end tell close front window -- info window of destDisk eject disk destDisk end tell end copyAllFiles ===== The reason for the keystroke calls is that according to Apple's AppleScript forum http://bbs.applescript.net/, the: get info for ... set icon to icon of it is broken; so the keystroke approach is necessary until Apple fixes this. Before I go, is there a way to pass the srcDisk and destDisk parms from SuperDuper to the above AppleScript using $3 and $4, rather than my hard coding them? *** *** Last edited by john love; 08-07-2006 at 12:19 PM. Reason: shorten script a bunch |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Cannot find target volume | Timmy | General | 6 | 03-13-2006 01:06 PM |
maintaining target volume icon | yoxi | General | 43 | 12-16-2005 09:41 AM |
SD sannot find target Volume problem | braeside | General | 7 | 09-02-2005 03:59 PM |
Error while trying to enable permissions on target volume | Hoosier_1701 | General | 11 | 07-16-2005 11:50 AM |
Cannot find target volume -- Even with volume mounted! | cmod | General | 3 | 06-03-2005 09:21 AM |