|
|
Joined: Apr 2003
Posts: 300
Fjord artisan
|
OP
Fjord artisan
Joined: Apr 2003
Posts: 300 |
is it possible to put into a dialog the position of an mp3, but it actually count, when i do it it just comes up with 0:00 and that is it
Last edited by andymps; 10/07/03 02:36 AM.
Liek OMG Yuo Stoleded my MageHurtzzzz!!!11
|
|
|
|
Joined: Feb 2003
Posts: 2,812
Hoopy frood
|
Hoopy frood
Joined: Feb 2003
Posts: 2,812 |
$gmt($calc($insound.pos / 1000),nn:ss)
If the mp3 should be greater than 1 hour, you will want: $gmt($calc($insound.pos / 1000),H:nn:ss)
This is a hacky use of $gmt, as it's really suppose to display the time of day at Greenwich Mean Time... but happens to work nicely when you want to format hours:minutes:seconds.
- Raccoon
Well. At least I won lunch. Good philosophy, see good in bad, I like!
|
|
|
|
Joined: Apr 2003
Posts: 300
Fjord artisan
|
OP
Fjord artisan
Joined: Apr 2003
Posts: 300 |
thnx
Liek OMG Yuo Stoleded my MageHurtzzzz!!!11
|
|
|
|
Joined: Apr 2003
Posts: 300
Fjord artisan
|
OP
Fjord artisan
Joined: Apr 2003
Posts: 300 |
ok that displays it but i want it to actually count with the position, is it possible ?
Liek OMG Yuo Stoleded my MageHurtzzzz!!!11
|
|
|
|
Joined: Feb 2003
Posts: 2,812
Hoopy frood
|
Hoopy frood
Joined: Feb 2003
Posts: 2,812 |
You would need some sort of an event to fire that will frequently update this information. I'm guessing then you want to set up a /timer that updates the display every second.
Example: /.timerMP3DISP 0 1 Titlebar MP3( $+ $gmt($calc($insound.pos / 1000),nn:ss) $+ )
This is an example of a Timer named MP3DISP that updates the Titlebar of miRC every 1 second, an infinite number of times.
- Raccoon
Well. At least I won lunch. Good philosophy, see good in bad, I like!
|
|
|
|
Joined: Apr 2003
Posts: 300
Fjord artisan
|
OP
Fjord artisan
Joined: Apr 2003
Posts: 300 |
ok the sooo would this work
/.timermpos 0 1 did -a Mp3_dialog 8 $gmt($calc($insong.pos / 1000),nn:ss)
Liek OMG Yuo Stoleded my MageHurtzzzz!!!11
|
|
|
|
Joined: Feb 2003
Posts: 2,812
Hoopy frood
|
Hoopy frood
Joined: Feb 2003
Posts: 2,812 |
Give it a whirl. Actually, I would put the code inside an Alias, and even add checking to make sure the Dialog exists before issuing a /did. But yes, that ought to do the trick.
Well. At least I won lunch. Good philosophy, see good in bad, I like!
|
|
|
|
Joined: Apr 2003
Posts: 300
Fjord artisan
|
OP
Fjord artisan
Joined: Apr 2003
Posts: 300 |
hmmm, i did that and it is stopped on 0:00
Liek OMG Yuo Stoleded my MageHurtzzzz!!!11
|
|
|
|
Joined: Apr 2003
Posts: 6
Nutrimatic drinks dispenser
|
Nutrimatic drinks dispenser
Joined: Apr 2003
Posts: 6 |
alias updatesong {
if (%updatesong == 1) {
set %song.pos $gmt($round($calc($insong.pos / 1000),0),n:ss)
.timer 1 1 did -i <dialogname> <id> 1 %song.pos
.timer 1 1 /updatesong
}
else { halt }
}
just make sure you put on *:DIALOG:<dialogname>:init:0:{ set %updatesong 1 /updatesong } It works for me Coca-Bear
|
|
|
|
Joined: May 2003
Posts: 2,265
Hoopy frood
|
Hoopy frood
Joined: May 2003
Posts: 2,265 |
alias posupdate { did -a <name> <id> $asctime($calc($inmp3.pos / 1000),n:ss) } then in you on dialog event: /timer $calc($inmp3.length / 1000) 1 /posupdate
new username: tidy_trax
|
|
|
|
|
|