Top

$wsound

+ 0 likes
Please Register to submit score.
Average Score  7.0
Scores Submitted  7
Date Added  Nov 27, 2005
Last Updated  Dec 01, 2005

Introduction

This snippet will let you retrieve info from media files on your computer.
The usage is the same as $sound ($sound(<file>).<property>) but with different properties.
The properties you can use are:
album, albumartist, author, duration, filesize, filetype, genre, iscopyright, isvbr, publisher, title, track, trackingid, userlastplayedtime, userplaycount, userplaycountmorning, userplaycountafternoon, userplaycountevening, userplaycountnight, userplaycountweekday, userplaycountweekend, userrating or year.
If you specify the duration property then $wsound() will accept a second parameter to let you specify the $asctime() format the time should be returned in (eg: nn:ss for minutes:seconds).
This identifier relies heavily on windows media player (tested with the latest version (10.00.00.3646) but might work on earlier versions).
Some of the properties will only interest you if windows media player is the player you use to play your music, these are:
trackingid, userlastplayedtime, userplaycount, userplaycountmorning, userplaycountafternoon, userplaycountevening, userplaycountnight, userplaycountweekday, userplaycountweekend and userrating.
The trackingid is an ID number media player gives to each file.
The userlastplayedtime is the last time the file was played.
The userplaycount is the amount of times the file has been played all of the way through (if you play a song half way through and then stop it this number will not increment).
The userplaycountmorning is the amount of times the file has been played in the morning.
The userplaycountafternoon is the amount of times the file has been played in the afternoon.
The userplaycountevening is the amount of times the file has been played in the evening.
The userplaycountnight is the amount of times the file has been played in the night.
The userplaycountweekday is the amount of times the file has been played on a weekday.
The userplaycountweekend is the amount of times the file has been played on a weekend.
The userrating is the rating the file has been given.

Grab the Code

Comments

  (8)  RSS
Mpdreamz
Comments: 29
 
mIRC Snippet:  $wsound
Posted on Nov 30, 2005 3:54 am
I really think snippets are rated too low on here, awesome work hixxy. Knowing your work this works. when i get home ill test this out in a while loop on my mp3 dir, cant wait :p.
hixxy
Comments: 28
 
mIRC Snippet:  $wsound
Posted on Dec 1, 2005 1:35 pm
The snippet wasn't working because you had to play the file to gather info from it, so I've updated the snippet so that it plays and then instantly stops the file. Hopefully, even on fairly slow pcs, you shouldn't be able to hear the song before it stops playing, but someone tell me if you can hear it please.
KuTsuM
Comments: 137
 
mIRC Snippet:  $wsound
Posted on Dec 3, 2005 7:10 pm
Great job, hixxy :) I only wish I were this good at comobj's ;/
hixxy
Comments: 28
 
mIRC Snippet:  $wsound
Posted on Dec 4, 2005 8:27 pm
I assume that means the snippet works for you? Good :)
Some people have reported that the snippet still doesn't work for them, yet it works for me and several others.

The problem with using COM is that something that works on one system could outright fail on the next. As you can imagine this can be annoying sometimes!
Gex
Comments: 94
 
mIRC Snippet:  $wsound
Posted on Mar 8, 2006 5:58 pm
maybe cz some of them doesnt have the COM OBJECT "WMPlayer.OCX" ???
Yoinx
Comments: 424
 
mIRC Snippet:  $wsound
Posted on Mar 8, 2006 6:02 pm
Gex, the com object is included in windows media player. So unless they uninstalled windows media player completely (im not even sure its possible) its a fair bet, they have it.
Gex
Comments: 94
 
mIRC Snippet:  $wsound
Posted on Mar 8, 2006 6:09 pm
there is lots of ways to uninstall mediaplayer...the simplest...visit the control panel add/remove programs then windows components. someppl dnt like windows mediaplayer (i am one of them) and install a basic mediaplayer like winamp or real or even jetaudio (my fav) ...
Yoinx
Comments: 424
 
mIRC Snippet:  $wsound
Posted on Mar 8, 2006 6:28 pm
then yeah, that would be why you dont have the object. Personally I never uninstall anything that comes with windows. for the simple fact that it removes their com objects. which more and more programs seem to milk lately.

Please Register or Login to start posting comments.
Bottom