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 08-08-2006, 09:47 PM
rdlsmith rdlsmith is offline
Registered User
 
Join Date: Jun 2006
Posts: 47
scripts

I have a simple applescript that I want to run after the backup process. I get different errors.

In one case SD! said it couldn't find the file. I saved the AppleScript as an application and had the hide extension box selected. Thinking that might have something to do with it, I saved the script as a 'script' and then SD! complained that it didn't have permission.

In those cases, I was just trying to run a script that did nothing but:

say "hello, got this far"

I just wanted to prove I could kick off the script.

What's the secret to running a script after SD!

Thanks
Reply With Quote
  #2  
Old 08-08-2006, 10:41 PM
rdlsmith rdlsmith is offline
Registered User
 
Join Date: Jun 2006
Posts: 47
almost there, unmount script

Okay, I wrote a AppleScript Application that checks to see if SD! is running and as long as it is, don't try the unmount. Otherwise, unmount the drive.

It looks as though this time SD! called the script! That's the good news. The bad news it, it never returned from the script. The script wouldn't close because SD! was open. SD! wouldn't continue because the script was still running.

So how do I get SD! to just kick off the script and continue or better yet, kick off a script after it finishes everything it has to do.

Thanks
Reply With Quote
  #3  
Old 08-09-2006, 03:18 AM
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
You'd have to put the script in the background and "nohup" it...
__________________
--Dave Nanian
Reply With Quote
  #4  
Old 08-09-2006, 07:35 AM
rdlsmith rdlsmith is offline
Registered User
 
Join Date: Jun 2006
Posts: 47
"nohup" ?

Quote:
Originally Posted by dnanian
You'd have to put the script in the background and "nohup" it...
I'm sorry Dave, I'm afraid I can't do that. What is "nohup"?

I called the unmount script from an iCal schedule and it seemed to work. So at least I have a solution. Not sure it's the right way to go about it but I just don't see how those before and after scripts are used from within SD!.

I'd rather call the AppleScript from SD! only when it's needed.
Reply With Quote
  #5  
Old 08-13-2006, 10:03 AM
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
nohup is a Unix command that prevents a command from aborting when its parent process exits. So, you'd do something like:

#!/bin/sh
nohup /bin/bash -c "sleep 10; osascript /a/path/to/some/script/file" &

That'd put a background process in place that would sleep for 10 seconds, then run a script.
__________________
--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
Scripts fail to run: "permission denied" putte General 1 06-16-2006 10:00 AM
Scripts and error detection edoates General 1 06-10-2006 06:10 PM
Best Itunes Library Backup Settings, Scripts? greenjeens General 5 05-21-2006 03:28 PM
Partitioning & Bu Strategy & scripts MacMedix General 1 09-19-2005 09:09 PM
Questions about "exclude system cache/temporary files" Copy Scripts Darkside General 1 05-12-2005 09:48 AM


All times are GMT -4. The time now is 03:45 AM.


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