Maybe this will help: http://www.dougscripts.com/itunes/sc...essomeplaylist
Hi. Quick question. Is there any way to have iTunes automatically play when the computer wakes up?
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.
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***
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
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.
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.
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.
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
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.
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.
Bookmarks