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?
Our new official repo is on github
LCD Smartie version 5.6 is released!
Download it now: https://github.com/LCD-Smartie/LCDSmartie/releases
LCD Smartie version 5.6 is released!
Download it now: https://github.com/LCD-Smartie/LCDSmartie/releases
Add Leading zeros
Moderators: _X7JAY7X_, caesar, IFR, mattcro, limbo
-
- LCD Smartie Fanatic
- Posts: 132
- Joined: March 9th, 2005, 2:21 pm
- Location: UK
-
- Plugin Author
- Posts: 1604
- Joined: February 13th, 2005, 7:38 pm
- Location: Athens - Greece
- Contact:
-
- Forum Supporter
- Posts: 590
- Joined: March 8th, 2006, 1:58 pm
- Location: Scotland
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.
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.
-
- LCD Smartie Fanatic
- Posts: 132
- Joined: March 9th, 2005, 2:21 pm
- Location: UK
That's Perfect. One can do almost anything with regular expressions.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.
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)