Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Applications > Mac Applications and Mac App Store

Reply
 
Thread Tools Search this Thread Display Modes
Old Apr 11, 2008, 11:22 AM   #1
pyles
macrumors newbie
 
Join Date: Jan 2008
Automator - Script for Ejecting all USB Devices

Hey guys,

I have a belkin USB Hub that I use to plug in my External HDD's, iPod, printers, USB thumbdrive, etc.

I was wondering (as I am just beginning, made my first Automator script last night), if I could use Automator to eject all of these things for me, so that when I want to take my Macbook I can just run that script and everything ejects.

I have it setup so that it will eject my 3 External HDD's, but when I have my iPod plugged in and I Use the default iPod Eject built into automator it says no iPod is connected (but one is because I see it in iTunes, etc).

So I am wondering, how do I actually get my iPod to eject, and is there a way to get it so that any external HDD's/Printers/Thumb drives I plug in, will automatically eject?

Thanks!
pyles is offline   0 Reply With Quote
Old Apr 11, 2008, 11:37 AM   #2
xUKHCx
Administrator emeritus
 
xUKHCx's Avatar
 
Join Date: Jan 2006
Location: The Kop
Is your iPod an iPod Touch? It seems as if that automator action can't do them (or at least my iPhone)

Change the automator action to a simple "Run applescript" and then enter this into it

Quote:
on run {input, parameters}

try
tell application "Finder"
eject the disks
end tell
tell application "iTunes"
eject iPod
end tell
on error
display dialog "sorry something went wrong"
end try
return input
end run
Seems to work on my machine.
xUKHCx is offline   0 Reply With Quote
Old Apr 11, 2008, 11:38 AM   #3
Slip
macrumors 6502a
 
Slip's Avatar
 
Join Date: Oct 2007
Location: Wiltshire, England
On the note of the iPod, which model is it? For the Touch you don't have to eject it before removing it from the dock; that's the only thing I can think of in regards to why Automator says there's no iPod connected. Sorry for the limited help
EDIT: Beat me to it ^
__________________
Laziness is nothing more than the habit of resting before you get tired.
SR MacBook|2GHz|4GB RAM|250GB HDD

Last edited by Slip; Apr 11, 2008 at 12:34 PM.
Slip is offline   0 Reply With Quote
Old Apr 11, 2008, 11:48 AM   #4
pyles
Thread Starter
macrumors newbie
 
Join Date: Jan 2008
Quote:
Originally Posted by Slip View Post
On the note of the iPod, which model is it? For the Touch you don't have to eject it before removing it from the dock; that's the only thing I can think of in regards to why Automator says there's no iPod connected. Sorry for the limited help
Thanks sorry it is a 2nd gen iPod Nano 4gb (green to be exact ) Haha. I will try the above. Thanks for the help so far guys!

Quote:
Originally Posted by xUKHCx View Post
Is your iPod an iPod Touch? It seems as if that automator action can't do them (or at least my iPhone)

Change the automator action to a simple "Run applescript" and then enter this into it



Seems to work on my machine.
Thank you so much! Works perfectly and gets the ipod as well!

Last edited by Mitthrawnuruodo; Apr 11, 2008 at 12:05 PM. Reason: Merging, please use MULTIQOUTE to answer more than one post...
pyles is offline   0 Reply With Quote
Old Apr 11, 2008, 12:35 PM   #5
Slip
macrumors 6502a
 
Slip's Avatar
 
Join Date: Oct 2007
Location: Wiltshire, England
Quote:
Originally Posted by pyles View Post
Thanks sorry it is a 2nd gen iPod Nano 4gb (green to be exact ) Haha. I will try the above. Thanks for the help so far guys!



Thank you so much! Works perfectly and gets the ipod as well!
Glad to see it's sorted
__________________
Laziness is nothing more than the habit of resting before you get tired.
SR MacBook|2GHz|4GB RAM|250GB HDD
Slip is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Applications > Mac Applications and Mac App Store

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
How to fix this Geektool Script for Lion? its Mac OS X 10.7 Lion 9 Jun 21, 2012 06:30 PM
there HAS to be this itunes script available somewhere ... eroxx Mac Applications and Mac App Store 2 Aug 21, 2011 08:56 PM
looking for a specific automation/script for itunes ... > eroxx OS X 0 Jun 4, 2011 07:17 PM
OS 9.2 - unable to copy from USB devices danram Mac Basics and Help 5 Sep 23, 2008 05:06 PM
iTunes for Windows - Go for it all MorganX Mac Applications and Mac App Store 23 Jun 6, 2003 08:51 AM


All times are GMT -5. The time now is 01:03 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC