mIRC Home    About    Download    Register    News    Help

Print Thread
#234713 07/11/11 11:02 PM
Joined: Nov 2009
Posts: 295
P
pball Offline OP
Fjord artisan
OP Offline
Fjord artisan
P
Joined: Nov 2009
Posts: 295
I'm trying to make a WMP now playing script for a friend and the only plugin which exports now playing info I've found is lousy shareware. So I figured this would be a good time to learn how to use coms.

My friend found a C# project which uses COMs to get all the tracks in the WMP library so it shouldn't be hard to get the now playing (if you know wtf your doing). http://www.codeproject.com/KB/audio-video/WindowsMediaListToXml.aspx

So I'm really asking if it's possible could someone make a COM based script to do this and explain the process. Not only will I love someone long time but I learn best from solid examples so hopefully I'd learn a lot.


http://scripting.pball.win
My personal site with some scripts I've released.
Joined: Apr 2010
Posts: 969
F
Hoopy frood
Offline
Hoopy frood
F
Joined: Apr 2010
Posts: 969
This can't be done. I've looked into it quite a bit.


I am SReject
My Stuff
Joined: Nov 2009
Posts: 295
P
pball Offline OP
Fjord artisan
OP Offline
Fjord artisan
P
Joined: Nov 2009
Posts: 295
aww, guess i just need to see if there is another plugin that makes an xml file or something with now playing info, that is free


http://scripting.pball.win
My personal site with some scripts I've released.
Joined: Apr 2010
Posts: 969
F
Hoopy frood
Offline
Hoopy frood
F
Joined: Apr 2010
Posts: 969
I have a WMP plugin that will write the now playing to a .txt file, but it can't output the "path\file" of now playing

Last edited by FroggieDaFrog; 08/11/11 01:06 AM.

I am SReject
My Stuff
Joined: Nov 2009
Posts: 295
P
pball Offline OP
Fjord artisan
OP Offline
Fjord artisan
P
Joined: Nov 2009
Posts: 295
I found a plugin to do that. The only problem now is that mirc doesn't like null tokens. So I need a simple a way process a string with null tokens or something frown

Author|Title|Duration|FileSize|FileType

author and title aren't guaranteed to exist

Update:
yay I found another alias to get tokens including null tokens, the one i had just started failing no clue why

Last edited by pball; 08/11/11 02:06 AM.

http://scripting.pball.win
My personal site with some scripts I've released.
Joined: Apr 2010
Posts: 969
F
Hoopy frood
Offline
Hoopy frood
F
Joined: Apr 2010
Posts: 969
Code:
if ($regex(<tokens>,/([^\|]*)(?:$|\|)/g)) {
  ;$regml(1) = author
  ;$regml(2) = title
  ;$regml(3) = diratopm
  ;$regml(4) = filesize
  ;$regml(5) = FileType
}

Last edited by FroggieDaFrog; 08/11/11 02:46 AM.

I am SReject
My Stuff
Joined: Jul 2007
Posts: 1,129
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
Here is the non-regex version in reply to froggie's:
Code:
tokenize 124 Author|Title|Duration|FileSize|FileType
;$1 = author
;$2 = title
;$3 = diratopm
;$4 = filesize
;$5 = filetype

Joined: Apr 2010
Posts: 969
F
Hoopy frood
Offline
Hoopy frood
F
Joined: Apr 2010
Posts: 969
what about empty tokens? Author||duration|FileSize|FileType ...that was his issue after all


I am SReject
My Stuff
Joined: Jul 2007
Posts: 1,129
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
Whoops, my bad. I misunderstood the question.


Link Copied to Clipboard