Page 1 of 1

Add Leading zeros

Posted: April 13th, 2006, 10:43 pm
by fishthecat
I'm using $WinampPosh. Then you are a few seconds into a mp3, it looks like this: 19
I want it to look like this: 0:19
Is there a way I can add the leading 0: on until the time reaches 1:00? Or do I need a plugin?

Posted: April 13th, 2006, 10:57 pm
by limbo
I'm afraid you need a plugin...
I can't recall the post right now but some user had the same problem and using the regular expression plugin didn't help.
athe whole deal is:
We need a good formatting plugin for winamp times. :?

Posted: April 15th, 2006, 8:15 pm
by mattcro
You can do this with regular expressions, as Reverse Engineer and I posted here

It's rather bewildering to the uninitiated, but download regexp.dll and try a copy/paste from the posts.

I have it set up so that when $WinampPosh returns something like "34" (34 seconds), the regexp function returns "0:34" in the conventional time format.

Matt.

Posted: April 16th, 2006, 11:52 am
by fishthecat
mattcro wrote:You can do this with regular expressions, as Reverse Engineer and I posted here

It's rather bewildering to the uninitiated, but download regexp.dll and try a copy/paste from the posts.

I have it set up so that when $WinampPosh returns something like "34" (34 seconds), the regexp function returns "0:34" in the conventional time format.

Matt.
That's Perfect. One can do almost anything with regular expressions.

To finish off this thread here's the answer to the question I asked at the top.
To get leading zeros, you need the regexp.dll plugin and the following code. It works like a charm.

Code: Select all

$dll(regexp,3,0:(\d*):#\1:#:(\d)#:0\1#0(\d\d)#\1,0:$WinampPosh)