Shirt Pocket Discussions  
    Home netTunes launchTunes SuperDuper! Buy Now Support Discussions About Shirt Pocket    

Go Back   Shirt Pocket Discussions > SuperDuper! > General

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 02-28-2005, 07:00 PM
macfeller macfeller is offline
Registered User
 
Join Date: Feb 2005
Posts: 49
trying to automate sleep

I have a couple applescripts that work in isolation. One is just to tell Finder to sleep. The other tells SD to quit and then Finder to sleep. The latter I got the idea from a thread on VersionTracker referring to an error that that person's script wouldn't work because it SD wouldn't quit. With each script, when put into the options pane and SD run, I get the following error in the log.

|05:23:50 PM|Error| ## Component Manager: attempting to find symbols in a component alias of type (imdc/IV32/intl)

Any ideas? I can't wait for version 2.

mf
Reply With Quote
  #2  
Old 02-28-2005, 07:12 PM
dnanian's Avatar
dnanian dnanian is offline
Administrator
 
Join Date: Apr 2001
Location: Weston, MA
Posts: 14,923
Send a message via AIM to dnanian
Well, mf, that particular error just looks like something that gets sent to the console, and not an error in SD! as such (in either case, it's not an SD! error but a scripting problem).

I don't have enough information here, though, to diagnose. Where exactly are you putting these commands? Are they in a shell script and set in the "Customization Script" part of options? (They have to be...)

Can you run that shell script by hand?

A bit more info and I should be able to point you to a solution...
__________________
--Dave Nanian
Reply With Quote
  #3  
Old 02-28-2005, 09:43 PM
dnanian's Avatar
dnanian dnanian is offline
Administrator
 
Join Date: Apr 2001
Location: Weston, MA
Posts: 14,923
Send a message via AIM to dnanian
By the way, an error like that indicates a problem with a QuickTime component installed in /Library/QuickTime... any 3rd party entries in there, from DiVX for example? (it looks like it is supposed to deal with AVI files)
__________________
--Dave Nanian
Reply With Quote
  #4  
Old 03-01-2005, 12:12 PM
macfeller macfeller is offline
Registered User
 
Join Date: Feb 2005
Posts: 49
[QUOTE=dnanian]Well, mf, that particular error just looks like something that gets sent to the console, and not an error in SD! as such (in either case, it's not an SD! error but a scripting problem).

For sure not SD!, didn't mean to imply. The line was copied from SD!'s log.

[QUOTE=dnanian]I don't have enough information here, though, to diagnose. Where exactly are you putting these commands? Are they in a shell script and set in the "Customization Script" part of options? (They have to be...)

It is an AppleScript saved as a Run Only Application. Not a shell script. It is set Run customization script in the Options pane.

[QUOTE=dnanian]Can you run that shell script by hand?

It runs in Applescript Studio and it runs stand-alone. That is, I can select it in Finder, double-click it, and it does what I want. My first attempt was such a script merely telling Finder to sleep. It worked fine but I got the same error. I gave up until I noticed the other thread here about shell scripts and someone's script not working because it couldn't get SD! to quit. So, I added that to the script. (Well, I saw this particular point in VersionTraker, I think.)

Quote:
Originally Posted by dnanian
A bit more info and I should be able to point you to a solution...
Below is the text from the script. Initially saved as an Application in AS Studio it would not run by double-clicking (error said "Connection is Invalid."). When saved as Run Only as Application, when double-clicked it quits SD! and then puts the machine to sleep. But when called on by SD! via Run custom script, the error occurs.

Dang! I just double-clicked it and it gave the Connection is Invalid. Being as I am I immediately double-clicked it again and it ran. I wonder if that has anything to do with it. I think I'll head for some Applescript forums. When messing with the script saved as Application (Run only not checked in dialog window) every single attempt gave the Connection is Invalid. Only once has a trial of the Run Only save gave that error.

Don't spend too much time onme. I can wait for v.2 to come out. And now the text, clearly nothing fancy!

tell application "SuperDuper!"
quit
end tell
tell application "Finder"
sleep
end tell
Reply With Quote
  #5  
Old 03-01-2005, 08:22 PM
dnanian's Avatar
dnanian dnanian is offline
Administrator
 
Join Date: Apr 2001
Location: Weston, MA
Posts: 14,923
Send a message via AIM to dnanian
Yes, quite simple... the error definitely seems to be in a QuickTime component, though... maybe you missed the request above: could you provide a list of what's in /Library/QuickTime?
__________________
--Dave Nanian
Reply With Quote
  #6  
Old 03-01-2005, 09:09 PM
macfeller macfeller is offline
Registered User
 
Join Date: Feb 2005
Posts: 49
Yeah, I read it and then forgot it. Sorry.

in /Library/QuickTime are
FLAC_Decoder.component
OggVorbis.component
Toast Video CD Support
ToastVideoCDSupport.component

there is no ~/Library Quicktime

in /System/Library/QuickTime
ApplePixletVideo.component
QuickTime Updater
QuickTime3GPP.component
QuickTimeBMPUpdate.component
QuickTimeComponents.component
QuickTimeFirewireDV.component
QuickTimeIIDCDigitizer.component
QuickTimeMPEG.component
QuickTimeMPEG2.component
QuickTimeMPEG4.component
QuickTimeStreaming.component
QuickTimeVR.component
Reply With Quote
  #7  
Old 03-01-2005, 09:18 PM
dnanian's Avatar
dnanian dnanian is offline
Administrator
 
Join Date: Apr 2001
Location: Weston, MA
Posts: 14,923
Send a message via AIM to dnanian
OK. Let's try moving the four components in /Library/QuickTime to a folder on your desktop and rebooting. See if that resolves the problem. If so, add them back one at a time until you get a failure... and when you do, that's the conflicting component...

(I'm guessing it's going to be one of the Toasts...)
__________________
--Dave Nanian
Reply With Quote
  #8  
Old 03-01-2005, 10:10 PM
macfeller macfeller is offline
Registered User
 
Join Date: Feb 2005
Posts: 49
So I go ahead and just try without the 2 Toasts. Curioser and curioser. WHen SD! gets to the point where it says it's invoking custiom script it stops and drops a sheet twith the following query:

SuperDuper! has not finished preparing the target volume.
Stopping now will leave BACKUP in an unknown state. Are you sure you want to Stop? Yes No [buttons]

Choosing No has SD! finishing and quitting, then nothing. Script is not invoked, but at least nothing like original issue. I ran it a second time so i could get the exact wording of the sheet. That time, by the time I finished copying the text I see the AppleScript icon bouncing in the Dock. I get an AppleScript error saying event has timed out. So I wonder if that happened the first time and I just missed it. No, I have tried two more times and each time I get the SD! message and nothing in the Dock. I don't know what happened that one time. Just tried again coz the AS occurence bothered me and this time it did appear but the AS error was Application not running. The only consisten thing has beed SD! pausing to give the sheet.

I'm going to bed. I don't even care about this feature all that much.
Reply With Quote
  #9  
Old 03-01-2005, 10:21 PM
macfeller macfeller is offline
Registered User
 
Join Date: Feb 2005
Posts: 49
Took a quick look at the log.

|09:04:28 PM|Info| ...ACTION: Execute Site Customization Script /Applications/Sleep.app
|09:04:28 PM|Info| ......COMMAND => Invoking site customization script: /Applications/Sleep.app
|09:04:54 PM|Info| Copy complete.
[---] Session ended: Tuesday, March 01, 2005 09:04:54 PM US/Central

So it looks like it calls the script before it "finishes" copying. That would explain getting the sheet when I do. The script runs and wants to sleep the machine. SD! asks me if i really want to do this. So, perhaps the 2 times I got the AS errors the script ran but since SD! was waiting for a response (and therefore not responding to anything else, such as a script) it did give the error about time out, not sure about Application not running.

Whatever, it seems that SD! does not have the script run "After copy" as the Options pane section says, but rather it runs the script right before it completes the copy.
Reply With Quote
  #10  
Old 03-01-2005, 10:27 PM
dnanian's Avatar
dnanian dnanian is offline
Administrator
 
Join Date: Apr 2001
Location: Weston, MA
Posts: 14,923
Send a message via AIM to dnanian
Thumbs up

OK, now that makes sense, actually!

The reason you're seeing that sheet is that the script you're running is trying to Quit SD! while it's still running ... your script!

If you remove that part, the normal SD! Daily Backup script will quit SD! when you wake from sleep.

Alternatively, you can run the command asynchronously, waiting for SD! to finish before quitting -- that's what Daily Backup does. But it's really not necessary since we already do it for you.

Hope that makes some sense to you!
__________________
--Dave Nanian

Last edited by dnanian; 03-01-2005 at 10:31 PM. Reason: Fixed typo
Reply With Quote
  #11  
Old 03-01-2005, 10:45 PM
dnanian's Avatar
dnanian dnanian is offline
Administrator
 
Join Date: Apr 2001
Location: Weston, MA
Posts: 14,923
Send a message via AIM to dnanian
Actually, it does callnthe script after the physical copy is finished -- but the whole operation isn't done...just the copy.
__________________
--Dave Nanian
Reply With Quote
  #12  
Old 03-02-2005, 02:28 PM
macfeller macfeller is offline
Registered User
 
Join Date: Feb 2005
Posts: 49
Yep, I do get it. Might keep playing with it. Main reason it's a problem is my machine is one of those PowerBooks with the notorious failure to sleep via Energy Saver Preference Pane setting.

Thanks for everything!
Reply With Quote
  #13  
Old 03-02-2005, 05:02 PM
dnanian's Avatar
dnanian dnanian is offline
Administrator
 
Join Date: Apr 2001
Location: Weston, MA
Posts: 14,923
Send a message via AIM to dnanian
Yeah, totally understood... just doing the sleep should handle it!
__________________
--Dave Nanian
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
An (Applescript) hack to automate mounting and unmounting external volumes kbradnam General 12 07-30-2007 07:12 AM
Getting SD to Allow Sleep after Copy Pixx General 5 02-19-2005 07:38 PM


All times are GMT -4. The time now is 04:34 AM.


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