Page 1 of 4 1234 LastLast
Results 1 to 10 of 32

Thread: Auto-Play iTunes on Wake Up?

  1. #1
    Newbie
    Join Date
    Dec 2006
    Posts
    14

    Auto-Play iTunes on Wake Up?

    Hi. Quick question. Is there any way to have iTunes automatically play when the computer wakes up?

  2. #2

  3. #3
    Variable Bitrate natedawgg's Avatar
    Join Date
    Jan 2007
    Location
    Dallas
    Posts
    365
    Quote Originally Posted by timeshifter View Post
    im not sure if any of those scripts will help when just coming out of sleep. the only one there just starts itunes from boot up.

    is there any setting to allow or "force" itunes to start playing wherever it left off when put to sleep?

  4. #4
    Newbie
    Join Date
    Dec 2006
    Posts
    14
    yeah thats what im looking to do as well. i could have sworn theres a way to do this with applescript but I havent touched applescript in about 6 or 7 years so Im clueless at this point.

  5. #5
    Admin. Linux loser.
    Auto Apps:loading...
    Bugbyte's Avatar
    Join Date
    Sep 2004
    Location
    Corning, NY
    Posts
    7,364
    Blog Entries
    2
    There is. I wrote a front end in Applescript and had to solve this problem straight away. However, you have to make the Applescript into an application and have it running all the time.

    Use the 'idle handler' which loops each time there are spare cycles on the CPU. Each time you loop, check the status of iTunes. If it is paused, tell it to play.

    Of course, the only way to pause iTunes once this app is running is to quit the app or quit iTunes. You can work around it if your app is a frontend or controller for iTunes but I don't think you can if it isn't.


    The code is something along these lines (I didn't test it). You can cut and paste it into the Applescript editor, then save it as an application.

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

    ***Edit - wait, it's not that simple. I tested it and the idle handler doesn't work. I'll have to investigate further when I have some time***
    Quote Originally Posted by ghettocruzer View Post
    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

  6. #6
    Variable Bitrate natedawgg's Avatar
    Join Date
    Jan 2007
    Location
    Dallas
    Posts
    365
    ok so i did some reading up on apple script and i finally got bugbyte's code to work. Here is what you need to do to make this work. in script editior enter in

    on idle
    tell application "iTunes"
    if player state is paused or player state is stopped then
    play
    end if
    end tell
    return 1
    end idle

    when you save this file make sure you save the script as an application and then check the "stay open" box at the bottom of the "save as" window.
    if you do everything correctly then you can run this app and it will check every second to see if itunes is paused. i checked it on my system and it seems to work great. if you have any problems pm me and i will see if i can help. thanks bug byte for your help on this.

  7. #7
    Constant Bitrate
    Join Date
    Jul 2006
    Location
    London
    Posts
    129
    Seems to work fine on the mac indoors, will add in the car tomorrow and test...!

    Just need it work within front row to be sure....!
    CLICK ME

    Smart Car due for completion beginning of march....

    Log with pictures to go online shortly after.

  8. #8
    Admin. Linux loser.
    Auto Apps:loading...
    Bugbyte's Avatar
    Join Date
    Sep 2004
    Location
    Corning, NY
    Posts
    7,364
    Blog Entries
    2
    Was THAT the problem?! Return 1?!

    You know, the on idle loop is a problem. It's not stable. That's the reason we stopped work on our applescript front end. It didn't behave predictably.
    Quote Originally Posted by ghettocruzer View Post
    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

  9. #9
    Constant Bitrate
    Join Date
    Jul 2006
    Location
    London
    Posts
    129
    Well, the only problem i can actually see with it at the moment, is the fact that you cannot pause iTunes at all....!

    So if you interrupt for a phone call it could cause a problem, is there a work around for the pause to still work...?
    CLICK ME

    Smart Car due for completion beginning of march....

    Log with pictures to go online shortly after.

  10. #10
    Variable Bitrate natedawgg's Avatar
    Join Date
    Jan 2007
    Location
    Dallas
    Posts
    365
    Quote Originally Posted by Bugbyte View Post
    Was THAT the problem?! Return 1?!

    You know, the on idle loop is a problem. It's not stable. That's the reason we stopped work on our applescript front end. It didn't behave predictably.
    yeah actually your code worked you prob just didn't let it run long enough. while i was reading i noticed that the idle handler only checks every 30 seconds or so unless you add the "return" with the number of seconds you want the idle handler to wait before it checks again.

Page 1 of 4 1234 LastLast

Similar Threads

  1. Auto Disconnect From Cell Phone Without Delay......Is This Possible?
    By jmciver in forum Wireless Communications
    Replies: 0
    Last Post: 12-16-2006, 12:56 PM
  2. Skin and auto play bug...
    By the_tiger in forum CF Bug Reports
    Replies: 0
    Last Post: 10-05-2006, 11:52 AM
  3. Winamp doesn't play, but the play sign is there
    By mbowler in forum Software & Software Development
    Replies: 0
    Last Post: 08-03-2000, 06:46 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •