mIRC Home    About    Download    Register    News    Help

Print Thread
#44051 25/08/03 06:15 AM
A
Arrow
Arrow
A
And before you ask, I know all about $duration and $insong.length.

Anyways, I just finished making a 20kb "media" player that will play WAV, MID, MP3, and OGG files based on mIRC's internal linking to WMP. It very nicely displays the length of tracks you're playing... when you're playing them. What I have set up though is an option to click on any track in your playlist and it gives info on the track; ID3(v2) info if it's an MP3 or OGG, and the filename with two directories back if it's a WAV or MID. What I want to do is also put the length of the song in with that little slice of info. Very easy to do with MP3, but I see no way whatsoever to do it using any mIRC identifiers for the other three formats. My other option was to tear into the beast known as OGG documentation, but I saw no binary values in OGG files that contain track length and I very quickly drowned in all that technical mumbo jumbo. Any suggestions?

Here's the highly disorganized code in case anyone needs to see it.

http://www.dszone.org/Files/Playlist.mrc

EDIT: Oh, I almost forgot. In the script, I use $findfile and $finddir to put the entire playlist in the custom window's main textbox and the current browsing directory in the sidebox. But those two seem to fill dir and filenames in order of the date and time the file was created on rather than (what I'd assume would be normal) alphabetically. Any idea how to get it to run alphabetically?

Last edited by Arrow; 25/08/03 07:02 AM.
#44052 25/08/03 02:01 PM
P
pheonix
pheonix
P
im not sure how, but im sure it can be done using /bread :tongue:

#44053 25/08/03 09:27 PM
Joined: Dec 2002
Posts: 127
F
Vogon poet
Offline
Vogon poet
F
Joined: Dec 2002
Posts: 127
as to the sorting alphabetically instead of by creation date, i'd add them to a @window with the '-s' flag, which sorts the lines of the listbox and then /loadbuf that to the dialog.

#44054 26/08/03 02:46 AM
A
Arrow
Arrow
A
BTW, I'm not doing this into a dialog; I'm putting it into the custom window in the first place.

Anyways, the /loadbuf worked wonders with the main box, allowing me to get rid of the $read loop to fill the playlist into it with. However, using -S to alphabetize the sidebox didn't help much, because now the folders are alphabetized along with the files, with no difference. I sort of wanted the folders alphabetized on top and the files right beneath that, like Windows standard.

#44055 26/08/03 03:30 AM
Joined: Dec 2002
Posts: 127
F
Vogon poet
Offline
Vogon poet
F
Joined: Dec 2002
Posts: 127
well, then use an @window to sort the folders, then add them to your main @window, then clear the temp window and add the folders to it and then add them to the main @window. btw- don't +S the main window, you're doing the sorting on your own in the temp @window.


Link Copied to Clipboard