Shirt Pocket Discussions

Shirt Pocket Discussions (https://www.shirt-pocket.com/forums/index.php)
-   General (https://www.shirt-pocket.com/forums/forumdisplay.php?f=6)
-   -   SuperDuper and Shell Scripting (https://www.shirt-pocket.com/forums/showthread.php?t=5230)

Beej 05-06-2009 09:06 PM

SuperDuper and Shell Scripting
 
Is there a command I can put in a shell script that will tell SuperDuper to 'run now'?

Reason: I'm trying to script some maintenance that will run SuperDuper, restart off the SuperDuper drive, check that everything is OK and restart off the original drive. I would like to do this because part of my normal procedure is to check that the SuperDuper drive is actually bootable and will load to the Desktop.

dnanian 05-06-2009 09:16 PM

You can use the general techniques we use in the scripting driver to run it with an AppleScript (and osascript will run from a shell script).

Beej 05-07-2009 09:37 PM

How would I go about learning more about the general techniques you use in the scripting driver?

dnanian 05-07-2009 09:38 PM

Well, you can extract the applescript from our application bundle (or see the FAQ for a much earlier script). It's reasonably well documented.

rlesperance 05-17-2009 02:50 AM

Hi dnanian,

Can you be more precise on where (link please) I can have more information on AppleScripting SuperDuper ?


Thanks in advance.


Robert Lespérance ;)

dnanian 05-17-2009 07:33 AM

You can examine the scripting dictionary, of course, and you can access our script driver in the application bundle. It's called "Copy Job Applescript.template".

rlesperance 05-17-2009 10:18 AM

Hi,

I have a demo version 2.5 of SD and checked aompletely the SD package. I found only «Copy Job Script.template». There is no AppleScript. If you have the exact path of the folder/files, maybe I missed something.

Also, I cannot open the AppleScript dictionary from the Script Editor.

Do I understand that SD has an AppleScript Dictionnary ? Is this only available in the registered version ? I searched SD's discussions and found no FAQ on the AppleScript subject.

Thanks in advance.



Robert Lespérance

dnanian 05-17-2009 11:03 AM

That file is AppleScript. Open it with Script Editor.

SD! certainly has a script dictionary and it opens just fine for me!

rlesperance 05-17-2009 01:23 PM

1 Attachment(s)
Hi dnanian,

I am unable to open the «Copy Job Script.template» file from within the Apple Script Editor (v 2.1.1 on Tiger 10.4.11). When forcing to open it with the ASE from within the contextual menu, I get 2 error messages (see picture).

What's wrong ? :o:o:o



Robert Lespérance

dnanian 05-17-2009 01:33 PM

Perhaps you have to rebuild your Launch Services database, Robert. The dictionary is definitely part of the application bundle.

chris_johnsen 05-17-2009 04:19 PM

When I drag the file to Script Editor (10.4.11 here), I get (what I assume) are the same error messages (but in English).

But copying the file and giving it the extension ".applescript" allowed Script Edtior to open it.
E.g.:
Code:

cd /Applications/SuperDuper\!.app/Contents/Resources
cp 'Copy Job Script.template' /tmp/'Copy Job Script.template'.applescript
open /tmp/'Copy Job Script.template'.applescript


rlesperance 05-17-2009 04:44 PM

Hi Chris,

Should of thought of it ... So simple. Your the genious ! Thank you. Now I need to find the access to the dictionary.

Being able to script SD is superduper !

Thank you again.



Robert

rlesperance 05-18-2009 10:31 PM

Hi Dnanian,

I am still unable to have access to SD's scripting dictionary. I looked in a few script, but didn't find really what I am looking for.

Is it possible to have access to that dictionary on the web ? Or maybe for you it is a simple script. If the name of my scheduled script is "Smart Update iMac G5 from Macintosh HD" what is the script to tell SD to execute that script now ?

Thanks in advance.



Robert Lespérance

dnanian 05-19-2009 07:54 AM

If you can't access our scripting dictionary, scripting won't be terribly useful because it wouldn't be able to be compiled, Robert.

rlesperance 05-19-2009 08:39 AM

Hi dnanian,

The funny thing is that I can script SD. I created a script that monitors the «status» of SD: running, idle or done, and it works.

On the other hand, SD does not reply to a «quit application» command in the script. I don't know what is the problem.

I will post the dictionary problem in the MacScripter discussion.

Regards.


Robert


All times are GMT -4. The time now is 12:21 AM.

Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2024, vBulletin Solutions, Inc.