Newsroom Update

Apple Music today announced the release of its 100 Best Albums of all time, a list crafted by Apple Music’s experts alongside industry professionals. Learn more >

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Autoplay on open

Does anyone know if there is a switch you can add to the command line of the shortcut to itunes so that it automatically starts playing music when you open it?

amd Windows XP

Posted on Jul 16, 2007 3:32 PM

Reply
4 replies

Aug 19, 2007 6:53 AM in response to spanglysteve

I'm looking for an answer to this question, too! Playing around, I've discovered that if I associate the file type with iTunes, I can simply invoke that file (either by typing "start" followed by the file from the command line, or by entering the file directly at the "run" prompt). But that's cumbersome. For example, I'm trying to launch an Internet stream in iTunes, but when I invoke the URL (see below), it first fires up IE (because of the http URL), which then in turn invokes iTunes. Clumsy.

Any better solution?

Aug 19, 2007 9:17 AM in response to Rob Ryan

Hmm, in priciple you should be able to do this with a simple script such as this bit of javascript:
==autoplay.js==
var iTunesApp = WScript.CreateObject("iTunes.Application")
iTunesApp.play();
==

This would need to be set off by shortcut to a .bat file which you put in your startup, the bat file needs to be in the same folder as the js file.

Bat file:
==
cscript autoplay.js //t:60
==

I haven't tested this at startup, but putting a shortcut to the bat file on the desktop and clicking from there opened iTunes and started it playing.
I found I needed a time out as otherwise the script terminated prematurely before iTunes opened.

It should start playing what it would play if you opened iTunes and pressed the play button.

Happy experimenting. 🙂

Aug 19, 2007 3:56 PM in response to polydorus

Thanks, that's great. I've done the same using VB Script, creating a file with the extension of VBS with the following code. Works like a champ, though you would want to use your own playlist name:

' VBS code to run particular playlist:

Set iTunesApp = CreateObject("iTunes.Application")
iTunesApp.Sources.ItemByName("Library").Playlists.ItemByName("WNYC-AM").PlayFirs tTrack()

Autoplay on open

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.