AppleScript to 'eject' iPod after copying is done.  Need a trick!

I'd like my AppleScript to eject my iPod Shuffle after it is done copying podcasts to it. Unfortunately, the 'duplicate' command is "asynchronous", meaning that it returns immediately, without waiting for the copies to complete. More unfortunately, instead of failing, the 'eject' command puts up a stupid dialog asking if it wants the copying to be interrupted, and halts copying until the user replies.
Does anyone know a to work around this?
Jerry Krinock
Here is the tail end of my podcast-updating script:
set nNewPodcasts to (count of newPodcasts)
set AppleScript's text item delimiters to {"
if (nNewPodcasts > 0) then
set newPodcastNamesList to newPodcastNames as text
display dialog "There are " & nNewPodcasts & " new podcasts:" & return & return & newPodcastNames & return & return & "Should copy these to " & iPodName & "?" buttons ["No", "Copy"] default button 2
if button returned of result is "Copy" then
with timeout of 30 * 60 seconds
repeat with aTrack in newPodcasts
try
log "Copying " & name of aTrack
duplicate aTrack to iPodPlaylist
end try
end repeat
end timeout
end if
else
display dialog "There are no new podcasts to copy to " & iPodName
end if
-- Eject the iPod
(* Unfortunately, the "duplicate" above is another asynchronous command; i.e. it returns before the job is complete. Therefore, we try and work around this by trying to eject the iPod repeatly every 5 seconds until success. But, instead, it puts up a stupid dialog. *)
repeat while exists thePod
log "iPod " & iPodName & " exists"
try
eject thePod
on error
log "Could not eject iPod"
end try
delay 4
end repeat
say iPodName & " has been ejected"

Use Disk Utility to burn disc images. Select the image to burn, then click on the Burn icon in the DU toolbar. The subsequent dialog has several options you can choose including Eject after burning.

Similar Messages

  • HT202380 Do I have to check "Ignore ownership on this volume" again, after copying is done?

    Do I have to check "Ignore ownership on this volume" again, after copying is done? Thanks. Alex

    Sorry I thought the context was clear. I followed the instructions on how to transfer a timemachine backup from one disk to another (linked above). One step in the howto is to uncheck "Ignore ownership on this volume". I was wondering if it is important to check it afterwards.

  • Ejecting ipod after photo update

    I have 2 questions: 1: Everytime I update new photos, my old ones dissapear. How do i keep the old ones and get the new ones?
    and 2: after i update my photos and itunes says the ipod is ready to eject, i click eject but a message appears saying that "the ipod can not be ejected because some files are in use by another application". I usually just unplug it,but id like to know how to make it work properly. please help !

    I have exactly the same problem on my i Pod. Any help please.

  • Error When Ejecting iPod After Sync

    After syncing my Music Library to my iPod device, I clicked on the little "eject" symbol in the iTunes program window so that I could unplug my device. However, an error message popped up.
    Error Box Title: mfac.exe - No Disk
    Error Box Text: There is no disk in the drive. Please insert a disk into drive D:.
    After clicking either "Cancel," "Try Again," or "Continue" the same error box pops up a second time. After I make a second selection (and I tried all possible combinations of those three options), the window disappears and a new error appears.
    2nd Error Box Title: iTunes
    2nd Error Box Text: The iPod <my device name> cannot be ejected because it contains files that are in use by another application.
    The only selection in this box is "Okay."
    Needless to say, the iPod does not eject, and now I can't remove it from my computer. I tried closing and reopening iTunes, and then restarting my whole computer, but the problem persists. I have never used my iPod to transfer any files other than a synced music library, or enabled the "use as removable storage" option.
    I am using a Windows 8.1 and iTunes version 12.1.2.27 64-bit. My device is an iPod Classic with software version 2.0.1.
    Thank you.

    Hello kmorrell11,
    It seems you are unable to disconnect an iPod from your computer successfully. That does sound troublesome. Is the iPod recognized in iTunes while connected? If so, you may want to consider restoring the iPod to factory settings. I have included an article with the steps to perform a restore. Once the restore is complete, you can attempt to resync media back to the iPod:
    Use iTunes to restore your iPhone, iPad, or iPod to factory settings - Apple Support
    Thank you for contributing to Apple Support Communities.
    Cheers,
    Bobby_D

  • Cannot eject Ipod after updating to 5.0

    I've never had trouble with ejecting until just updating to 5.0. I get the message, "the Ipod 'ipod' cannot be ejected because it contains files that are in use by another application." Now the new music on my desktop won't go to the Ipod. Any suggestions would be greatly appreciated.

    My problems on an iMac G5 running Tiger started 9/21 when I upgraded to iTunes 5.0.1. (Prior to that there were problems mounting the iPod if I waited too long after turning on the computer, iTunes 5.0).
    On 9/21 iPod mounted but would not sync nor eject. Strangely, on 9/22 iPod synchronized and ejected; but on 9/26 it would not sync even though iTunes said it had. And then it would not eject, giving error messages to the effect that the iPod or its files were in use by antoher application.
    9/27 I plugged the iPod into a Powerbook running Panther... no mounting problems... no ejection problems.
    The iPod is third generation with version 2.3 software... connected by firewire.
    I need help also... I am concluding that the problem lies in either the computer, Tiger or iTunes. But how to fix?

  • HT1351 Whenever I try and eject my iPod from iTunes after it is done syncing a box pops us that says "The iPods' 'Owners iPod' cannot be ejected because it contains files that are in use by another application".

    Whenever I try and eject my iPod from iTunes after it is done syncing a box pops us that says "The iPods' 'Owners iPod' cannot be ejected because it contains files that are in use by another application".iTunes is the only thing open on my computer so I don't understand what this could mean.  If anybody could help me out that would be great. Thanks

    Hello, cgtyoder. 
    Thank you for visiting Apple Support Communities. 
    Try resetting the iPod and power cycling your Mac to see if this message disappears.  If the issue persists you may need to restore the device to factory settings.  The article below will walk you through both these steps.
    How to reset iPod
    http://support.apple.com/kb/ht1320
    Cheers,
    Jason H.

  • I just got a new MacBook Pro, and I tried to bring across my files from my last mac using time machine. After it was done copying I can't find my files anywhere but the space (about 130gb) has been used on my hard drive. Help please!!

    I just got a new MacBook Pro, and I tried to bring across my files from my last mac using time machine. After it was done copying I can't find my files anywhere but the space (about 130gb) has been used on my hard drive. Does anyone know how I can get to them? I did change my user name from 'user' while it was copying, could this have something to do with it?

    You don't want to do that by copying.
    Your best bet, by far, is to use Setup Assistant.  If your Mac is running Snow Leopard, see Using Setup Assistant on Snow Leopard or Leopard.
    If it came with Lion, it's a bit different: Using Setup Assistant on Lion

  • My ipod shuffle (4th gen) don't works after hard reset with itunes

    My ipod shuffle (4th gen) don't works after hard reset with itunes, it don't reads too like USB by Windows.
    Before that i've seen error (-50) in iTunes, so i reset ipod.
    I've read all tips on this site, but nothing helps me.

    No, USB works good. I've tried reset on my friend's PC, and it saw my ipod and reset was done. But when i tried to load music, it wrote me, that i've installed incorrect software.

  • My regular computer (which has i-tunes) is broken right now and I plugged my ipod into my temporary Chromebook to charge it.  Now the ipod is telling me to Eject before disconnecting and I don't know how.  Please help!

    My regular computer (which has i-tunes installed on it) is broken right now and I plugged my ipod into my temporary Chromebook to charge it. Now the ipod is telling me to Eject before disconnecting and I don't know how.
    Please help!

    Hello joan marie\'s ipod,
    Thank you for the question.  You can safely eject your iPod using these steps:
    To eject iPod:
    Select your iPod in the iTunes Source list.
    Click the eject icon next to the iPod in the Source list or choose Eject iPod from the Controls menu.
    You can find these steps and additional ways to eject your iPod in the following article:
    Safely disconnect iPod
    http://support.apple.com/kb/ht1853
    Thank you for using Apple Support Communities.
    Best,
    Sheila M.

  • When I try to eject my ipod after sync I get the following message:"The iPod cannot be restored because it contains files that are in use by another application.". I tried to restore but it doesn't work and I get the same message

    When I try to eject my ipod after sync I get the following message:The iPod cannot be restored because it contains files that are in use by another application.". I tried to restore but it doesn't work and I get the same message

    Go to your computer's System Tray and try ejecting.  If you can't eject, there is an application that is trying to access your iPod.
    Go to http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx and download ProcessExplorer.
    Go to http://support.microsoft.com/kb/555665 and follow the instructions under Resolution.
    Note that this is a good, general process any time you can't access any file.
    In my case an update to RealPlayer installed a program called RecordingManager that was accessing my iPod.

  • I was downloading the software update for ipod touch 2gen and after it was done downloading it showed that there was an error with my ipod and when i saw it was on the lockscreen loading. its been like this for 4 hours already

    I was downloading the software update for ipod touch 2gen and after it was done downloading it showed that there was an error with my ipod and when i saw it was on the lockscreen loading. its been like this for 4 hours already

    What did the error message say?
    Try:
    - iOS: Not responding or does not turn on
    - Also try DFU mode after try recovery mode
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings
    - If not successful and you can't fully turn the iOS device fully off, let the battery fully drain. After charging for an least an hour try the above again.
    - Try on another computer                            
    - If still not successful that usually indicates a hardware problem and an appointment at the Genius Bar of an Apple store is in order.
      Apple Retail Store - Genius Bar

  • I submitted my information to receive a replacement 1st generation nano but somehow did not notice what steps I needed to take to return the Ipod to Apple. What needs to be done after submitting the serial number information online?

    I submitted my information to receive a replacement 1st generation nano but somehow did not notice what steps I needed to take to return the Ipod to Apple. What needs to be done after submitting the serial number information online in order to obtain a replacement?

    They're supposed to send you a box with shipping instructions which you then use to send them your 1st generation iPod, however, I've been waiting a month for my box and can't figure out why I have not received it

  • I have a macbook and after i've done the upgrade to lion os i cant eject the cd from the tray! any suggestions???

    I have a macbook and after i've done the upgrade to lion os i cant eject the cd from the tray! any suggestions???

    Restart the computer (e.g. via the Apple menu). At the point you hear the startup chime (or sooner), hold down the trackpad or mouse button, and keep holding it down until after the point the Apple logo appears during startup.
    The CD should be ejected by the time the Apple logo appears.

  • How to set iPod to eject automatically after sync?

    Hi!
    My mother's iPod "ejects" automatically after syncing. Mine, I have to click the eject button. Mine is 8 GB hers is 4 GB, but both are third generation. How can I set it up to eject my iPod automatically after sync, like my mother's?
    Thank you!

    Do you have your 8 GB iPod set to Enable Disk Mode? If so, that would explain it since doing that requires you to manually eject the iPod.

  • Some files dont copy or sync to ipod after editing--.

    some files dont copy or sync to ipod after editing , but when i again do some more editing or revert it back  , it works normal

    Remember: we cannot see your machine. There are 9 different versions of iPhoto and they run on 8 different versions of the Operating System. The tricks and tips for dealing with issues vary depending on the version of iPhoto and the version of the OS.  So to get help you need to give as much information as you can. Basic things like :
    - What version of iPhoto.
    - What version of the Operating System.
    - Details. As full a description of the problem as you can. For instance: 'iPhoto won't export' is best explained by describing how you are trying to export, and so on.
    - History: Is this going on long? Has anything been installed or deleted?
    - Are there error messages?
    - What steps have you tried already to solve the issue.
    - Anything unusual about your set up? Or how you use iPhoto?
    Anything else you can think of that might help someone understand the problem you have.
    Posts that consist of "iPhoto doesn't work. Help" or "iPhoto won't print" or "Suddenly I have no photos!!!!!!!!!!" mean that any helper is simply guessing. More information means you get better assistance.

Maybe you are looking for

  • How do I add an effect to a SmartShape on hover?

    How do I add an effect to a smartshape on hover. For example, I've created a green rectangle which is a smartshape and is being used as a button. I have two instances of this button on a slide and am trying to do the following: 1) SmartShape A (Green

  • One day my deskjet all in one 3512 wont give me an option to scan

    clicking the icon, you get the option to scan, and you can scan several documents to one file, but now as i click on the icon, it gives only printer options, if i right click on it, i get an option to scan but only a single photo, and it wont save as

  • A swf in an iFrame calling javascript function on Parent page

    I have a .swf that has to load in a iFrame and needs to call a browser cookie javascript function that lives on the parent page that loads the iFrame. I'm using this: ExternalInterface.call("javascriptFunction"); but of course this call is not making

  • TS4268 Setting up Phone Number on my iPad iMessage Feature

    I may not be getting this but, I cannot list my iPhone number under Settings > Messages > Receive At on my iPad.  Any help?

  • Blackboard Learning Systems Network Reqs?

    Greetings to all, Does anyone have any experience working with the Academic Suite from Blackboard? We're being added to put together a design to support this, but they aren't forth coming on what the network requirements are going to be. For those th