Go Back   Computer Forums > General Computing > Programming
Click Here to Login
Join Computer forums Today


Reply
 
Thread Tools Search this Thread Display Modes
 
Old 12-28-2011, 10:37 AM   #1
Baseband Member
 
Join Date: Dec 2005
Posts: 44
Default Programming a Track Switch in Itunes or other Media Player

Hey guys,

I've been out of the computer scene for many many years. But I figured what I am trying to do is very simple and some of the folk on this forum might be able to help out.

Basically all I want is at 11:59 on New Years the music to automatically stop playing and then at 12:00 for the Auld Lang Syne song to play. Figure there should be a code that can be easily written to stop the music, and then start the next track without a human actually physically hitting the buttons (kind of a long story on why it needs to be done this way).

Was going to use Itunes, but not sure if it can be easily done. Maybe with api scripts or something else.

Thoughts, suggestions? Anyone do this before?
__________________

Frost17 is offline   Reply With Quote
Old 12-29-2011, 10:32 AM   #2
Site Team
 
berry120's Avatar
 
Join Date: Jul 2009
Location: England, UK
Posts: 3,425
Default Re: Programming a Track Switch in Itunes or other Media Player

Do you want any music on the computer to stop playing or just the song in whatever media player you choose?

Essentially you'll have to find a media player you can write a plugin for, once you know the language and architecture it shouldn't be too hard but this is never something I've done so I can't help in any great detail.

Of course there's the hacky way which could just switch to the desired window then mimic the keystrokes to stop the current song and play the desired one... then you can just set that program as a scheduled task / cronjob.
__________________

__________________
Save the whales, feed the hungry, free the mallocs.
berry120 is offline   Reply With Quote
Old 12-29-2011, 04:52 PM   #3
Baseband Member
 
Join Date: Dec 2005
Posts: 44
Default Re: Programming a Track Switch in Itunes or other Media Player

Yea, basically the plan is I want one playlist to play before midnight, and then it to automatically cut off at 11:59 - then at 12, a different play list plays.

Suggestions?
Frost17 is offline   Reply With Quote
Old 12-30-2011, 07:36 AM   #4
Site Team
 
berry120's Avatar
 
Join Date: Jul 2009
Location: England, UK
Posts: 3,425
Default Re: Programming a Track Switch in Itunes or other Media Player

Well, as I said there's two basic approaches:

- The "proper" way, where you find the API / library that goes alongside your player and then write the appropriate plugin

- The "cheat" way, where you set a scheduled task to emulate the (prone to change) keyboard shortcuts that will start your selected song.

I'll say now - if you've never done any programming then either way is probablya tall order, and I don't know of any player with this sort of functionality built in! Your best bet if you want to research it may be to look into controlling windows media player with .NET (I'm not really a .NET guy so I don't know how feasible that'd be, but it strikes me as the sort of thing that Microsoft would provide a way to do.) But again, simple as it seems it's not going to be a 5 minute learning process and a 2 second job!
__________________
Save the whales, feed the hungry, free the mallocs.
berry120 is offline   Reply With Quote
Old 12-30-2011, 10:51 AM   #5
xxcobraxx
 
Join Date: Oct 2004
Location: England
Posts: 6,224
Default Re: Programming a Track Switch in Itunes or other Media Player

I think theirs a 10x easier way, make a shortcut for the play list and use a .bat file to execute it

google.com would be a fast soultion, click below as the links inside, the search link, not just google itself

Google
IAntDemo is offline   Reply With Quote
Old 12-30-2011, 10:52 AM   #6
Site Team
 
berry120's Avatar
 
Join Date: Jul 2009
Location: England, UK
Posts: 3,425
Default Re: Programming a Track Switch in Itunes or other Media Player

Would that necessarily stop all music playing in the background though? I thought that was what he was after.

Of course, if the above solution works for you then go with it! I may just be overcomplicating things
__________________
Save the whales, feed the hungry, free the mallocs.
berry120 is offline   Reply With Quote
Old 12-30-2011, 07:02 PM   #7
xxcobraxx
 
Join Date: Oct 2004
Location: England
Posts: 6,224
Default Re: Programming a Track Switch in Itunes or other Media Player

Quote:
Originally Posted by berry120 View Post
Would that necessarily stop all music playing in the background though? I thought that was what he was after.

Of course, if the above solution works for you then go with it! I may just be overcomplicating things
you're funny berry
__________________

IAntDemo is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off



All times are GMT -5. The time now is 05:27 AM.


Powered by vBulletin® Version 3.8.8 Beta 4
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO 3.6.0