Justin (jwendl) wrote in lj_dev,
Justin
jwendl
lj_dev

Ok lets see here i noticed in the win32 client

lets see here i noticed that in the win32 client to do list that there was a need to get the auto detect to work with windows media player 7, well since this is what i use for my mp3's i created a work around here are some things to note (if they haven't been mentioned b4). first off windows media player isn't a standard windows program ie; text boxes don't have standard window handles, everything is called "windows media player" when doing an api spy on it - so to get it to work you need to make a custom skin. to solve this on my system i created a custom skin that placed the song title on the title bar of the windows media player ( something that microsoft should have done in the first place ) and the code i used in the skin was

function UpdateMetadata()
{
metadata.value = "Track: "+player.currentmedia.name;
metadata.value += " By: "+player.currentmedia.getiteminfo("author");
metadata.value += " Length: "+player.currentmedia.durationString;
view.title = metadata.value
}

and its output is Track: My Descent Into Madness By: Eels Length: 03:54
in the title bar
and as anyone else knows that you can easily pick up text from a title bar that always begins with the word "Track: " so in my vb client that i use for lj i used windows api to search for any window that begins with "Track: " and grabbed the rest of the text inside there the api code i used is not on my work computer doh i was going to post it but instead of wasting room and such i wont he he. ummm if anyone wants me to let me know, but im sure everyone on here knows win32 api well enough to know how to do this. but as to my point, if we are going to give the public an easy way to grab the song from windows media player they would have to use a special lj skin to do it hmmm what an idea maybe even letting this skin post lj entrys (just an idea) it is possible.
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 4 comments