Announcement

Collapse
No announcement yet.

Resuming iTunes playback?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Resuming iTunes playback?

    Well, I officially have the Macindash up and running, using iTunes for my media, VPC and iGuidance for GPS, and soon, an iSight and QT Pro for video aquisition. It's running great, with the exception of the occasional Windows hiccup (surprise surprise, somebody please make iGuidance Mac native!), and one other nagging issue. I've heard a lot of you say your iTunes resumes playback automatically when you start the car and wake the Mini. For whatever reason, mine does not. Is there a setting I need to change somewhere, or workflow I need to build or something? I searched for an answer to this and found no useful results. Thanks for any help you can give, I appreciate it.

    ~JD
    MY04 Subaru WRX, San Remo Red,
    Mac Mini carputer (Macindash) nearly complete. Current capabilities: Media playback, touchscreen interface, dual OS via VPC, iGuidance navigation. Future plans: Video capture, OBD-II interface, more racing stuff.

  • #2
    I've an AppleScript application, which tells iTunes to resume playing, set up and running if the Mac mini wakes up. This application does many other things more like reactivating GPS in Route66, etc...

    A simple AppleScript would contains follow command:
    Code:
    tell application "iTunes" to play
    And with SleepWatcher you can run applications on wakeup and sleep. :-)

    ByE...

    Comment


    • #3
      Thanks! I had a feeling something like that would work. Looks like I now need to pick up a book on AppleScript syntax. 5 programming languages under my belt and it's not one of them, how useful am I? Haha.
      MY04 Subaru WRX, San Remo Red,
      Mac Mini carputer (Macindash) nearly complete. Current capabilities: Media playback, touchscreen interface, dual OS via VPC, iGuidance navigation. Future plans: Video capture, OBD-II interface, more racing stuff.

      Comment


      • #4
        Originally posted by SanRemoRex
        Thanks! I had a feeling something like that would work. Looks like I now need to pick up a book on AppleScript syntax. 5 programming languages under my belt and it's not one of them, how useful am I? Haha.
        For the first steps, no book is needed. Open ScriptEditor... enter the line... save as Programm... Done!

        ByE...

        Comment


        • #5
          Right, I'm just not sure about the syntax for conditionals, and however it detects a wakeup. Would it be something like this?

          if computer wakes from sleep
          tell application "iTunes" to play
          end tell
          end if
          MY04 Subaru WRX, San Remo Red,
          Mac Mini carputer (Macindash) nearly complete. Current capabilities: Media playback, touchscreen interface, dual OS via VPC, iGuidance navigation. Future plans: Video capture, OBD-II interface, more racing stuff.

          Comment


          • #6
            No. It's more difficult than that because Applescript can't detect when you've gone to sleep or not. Thus, the need for the sleep watcher app.

            There is a way, however, for you to do using only AS. You simply write an applescript that does an infinite loop and leave it running. Here's the code:

            repeat
            tell application "iTunes"
            if player state is paused or player state is stopped then
            play
            end if
            end tell
            end repeat


            Simply open the Script Editor (It's in your Applescript folder in the Applications folder). Paste this into the editor window and hit run.

            Save it and put it on your desktop. Launching it will automatically launch iTunes and start it playing. You can set it as a startup item if you want.

            -->Edit: Nevermind. Here it is attached. Try it out. Try pausing iTunes while it's running. I just tested it on my desktop Mac and it worked fine.
            Attached Files
            Originally posted by ghettocruzer
            I was gung ho on building a PC [until] just recently. However, between my new phone having internet and GPS and all...and this kit...Im starting to have trouble justfiying it haha.
            Want to:
            -Find out about the new iBug iPad install?
            -Find out about carPC's in just 5 minutes? View the Car PC 101 video

            Comment


            • #7
              Ok, I see. I do like having the ability to pause for calls and such though. I will try combining it with that SleepWatcher app and see how it works. Won't get to try it until this weekend though, I need to get back on campus so I can have wifi access, haha.
              MY04 Subaru WRX, San Remo Red,
              Mac Mini carputer (Macindash) nearly complete. Current capabilities: Media playback, touchscreen interface, dual OS via VPC, iGuidance navigation. Future plans: Video capture, OBD-II interface, more racing stuff.

              Comment


              • #8
                Right. You can fix that pause issue but it just requires a little more coding. You'll need to graduate to an Applescript application that let's you do that. It's not real hard, but anytime you're dealing with a new language, the initial learning curve is pretty steep.
                Originally posted by ghettocruzer
                I was gung ho on building a PC [until] just recently. However, between my new phone having internet and GPS and all...and this kit...Im starting to have trouble justfiying it haha.
                Want to:
                -Find out about the new iBug iPad install?
                -Find out about carPC's in just 5 minutes? View the Car PC 101 video

                Comment


                • #9
                  Make it simple.
                  1. Install SleepWatcher
                  2. Save a little AppleScript with ScriptEditor as program "play_itunes". The Script should contain following content:
                    Code:
                    tell application "iTunes" to play
                  3. Create a .wakeup File in your home directory containing following commands:
                    Code:
                    #!/bin/sh
                    # runs after wakeup from sleep
                    
                    open "/path/to/play_itunes.app"
                  This will execute the AppleScript-Application after every wake up and you have don't worry about pausing iTunes.
                  ByE...

                  Comment


                  • #10
                    Originally posted by SanRemoRex
                    I've heard a lot of you say your iTunes resumes playback automatically when you start the car and wake the Mini. For whatever reason, mine does not.
                    Does the Mini not do this well for some reason? My old TiBook, my new AlBook, and my Dual 800 all continue playing iTunes when they wake up. Does it maybe have something to do with the car environment (i.e. any other weird sleep related issues)? Just curious as this (how well OSX sleeps compared to Windows) is usually the hook when i'm talking to a Mac hater that makes then stop short

                    -dave
                    My pathetic worklog.
                    CarFrontEnd (now it's own sub-forum!!!!)

                    Comment


                    • #11
                      Originally posted by iamgnat
                      Does the Mini not do this well for some reason? My old TiBook, my new AlBook, and my Dual 800 all continue playing iTunes when they wake up. Does it maybe have something to do with the car environment (i.e. any other weird sleep related issues)? Just curious as this (how well OSX sleeps compared to Windows) is usually the hook when i'm talking to a Mac hater that makes then stop short
                      Hmm, I'm sure, all my Macs (TiBook 500, Dual800 and the mini in the car) doesn't resume playing in iTunes after wakeup. But it's not a problem, because only in the car I want to play music automatically in iTunes (after boot or wakeup).

                      ByE...

                      Comment


                      • #12
                        Yeah, my iTunes simply pauses when you sleep it. Doesn't matter if it's desktop or car.
                        Originally posted by ghettocruzer
                        I was gung ho on building a PC [until] just recently. However, between my new phone having internet and GPS and all...and this kit...Im starting to have trouble justfiying it haha.
                        Want to:
                        -Find out about the new iBug iPad install?
                        -Find out about carPC's in just 5 minutes? View the Car PC 101 video

                        Comment


                        • #13
                          question... what would you guys recommend if i wanted it to automatically bring me back into frontrow and to the "now playing" screen?

                          essentially trigger it to open frontrow (apple-esc), then hit return twice

                          Comment


                          • #14
                            Is front row Applescriptable? If so, you can write a script to do that.

                            To find out, open Script editor (it should be in your Applications folder) and got to File --> Open Dictionary. Try to select front row. If it is apple scriptable, you'll be able to see all of the commands you can give it using AS.
                            Originally posted by ghettocruzer
                            I was gung ho on building a PC [until] just recently. However, between my new phone having internet and GPS and all...and this kit...Im starting to have trouble justfiying it haha.
                            Want to:
                            -Find out about the new iBug iPad install?
                            -Find out about carPC's in just 5 minutes? View the Car PC 101 video

                            Comment


                            • #15
                              Code:
                              tell application "System Events"
                              	tell application "Front Row" to activate
                              	key code 53 using {command down}
                              	delay 0.0
                              	key code 53
                              	delay 3.0
                              	key code 36
                              	delay 3.0
                              	key code 36
                              end tell
                              works... now to make sleepwatcher work

                              Comment

                              Working...
                              X