Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Run Script When Drive is Mounted?

Run Script When Drive is Mounted?
Thread Tools
Mac Elite
Join Date: Nov 2003
Location: Rockville, MD
Status: Offline
Reply With Quote
Sep 19, 2005, 03:00 PM
 
I have an external FireWire hard drive. It would be great to be able to run my backup via SuperDuper automaticallhy whenever the drive is mounted. Is this possible? I'm currently fooling around with an AppleScript that looks something like this:
Code:
on adding folder items to "LaCie HD" after receiving "Lacie HD" tell application "SuperDuper" activate run end tell end adding folder items to
Of course, it doesn't work yet because I pretty much made it up. Anybody know what to do next?
     
Junior Member
Join Date: Mar 2000
Location: Salem, OR, USA
Status: Offline
Reply With Quote
Sep 25, 2005, 11:44 PM
 
[PHP]on adding folder items to this_folder after receiving these_items
--if item -1 of these_items as string is "Backup 095:" then
if these_items as string is "Backup 095:" then
tell application "SuperDuper"
activate
run
end tell
end if
end adding folder items to[/PHP]

Attach the script to /Volumes.

Don't know about the SuperDuper part since I have never heard of it.

Look here http://www.apple.com/applescript/folderactions/
for help on folder action scripts.

-numero
     
Mac Elite
Join Date: Nov 2003
Location: Rockville, MD
Status: Offline
Reply With Quote
Sep 26, 2005, 08:08 AM
 
Thanks, numero. That'll come in handy.

I ended up investing a few bucks in Peripherally Speaking ($6.95), which is a nifty little app that can do all kinds of things when devices are attached/mounted/unmounted, including running an AppleScript or launching a backup utility.
     
   
Thread Tools
Forum Links
Forum 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
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 07:37 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2