Applescript - how do i make the rest of the script continue as 1 part is working?

Discussion in 'macOS' started by equalsabracket, May 20, 2010.

  1. equalsabracket macrumors regular

    Joined:
    Nov 10, 2008
    #1
    I have an applescript that wakes me up in the morning, reading stuff out to me and starting my music. I have a song which I wake up to which goes quiet at about the 20 second mark, and so i cut out the first 20 seconds and made it its own track. The speech part of the script is 25 seconds, and i want the applescript to wait for 20 seconds after starting the music playing, then pause it, switch to the other song and play that, whilst the speech part of the script is talking.

    I know the script needed to make the pausing and changing songs happen, but how do i get that part of the script to run without the rest of the script waiting for the result of it (since the rest of the script doesn't rely on it)?
     
  2. iThinkergoiMac macrumors 68030

    Joined:
    Jan 20, 2010
    Location:
    Terra
    #2
    Make the second part a separate script... have the 1st part call the 2nd script before running the part that's giving you trouble. I assume running 2 scripts at a time isn't an issue?
     

Share This Page