#17
|
|||
|
|||
Pass the srcDisk and destDisk parms from SuperDuper's shell script to AppleScript
What I was trying to do initially was access within the shell script a specific handler in the AppleScript and that did not work for me.
Then I simply accessed the whole AppleScript from the shell script and within the AppleScript's on run handler accessed the specific handler ... and this worked. After burrowing around Apple's AppleScript Bulleting Board , I found out how to pass parameters from within a shell script to an external AppleScript script ... 1) my shell script = "set_icon_shell_script.txt": #!/bin/sh echo "Restoring icon ..." osascript ~/Library/Application\ Support/SuperDuper\!/Saved\ Settings/set_icon_applescript_from_shell.scpt "iMac Internal HD" "iMac_Internal_DU" 2) duped it (so I can retain the original .txt) 3) chmod +x on the copy within Terminal 4) changed the copy's suffix to .command as in "set_icon_shell_script.command" Then I double-clicked the ".command" file, Terminal started up and it worked, as described below. Next, is the AppleScript code: on run parms set theSrcDisk to item 1 of parms set theDestDisk to item 2 of parms copyAllFiles(theSrcDisk, theDestDisk) end run on copyAllFiles(srcDisk, destDisk) -- code end copyAllFiles Anyway, it worked. Just one thing is lacking ... above I have what I call the long-way-around path for the AppleScript file within my osascript call ... This AppleScript file is in the same Folder as my shell script, yet just using: osascript set_icon_applescript_from_shell.scpt parm1 parm2 generates "no such file" in the Terminal. ????? Cheers! John Love |
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 |