 |
Loto Apprentice
Joined: 05 May 2003 Posts: 194
|
Posted: Fri Aug 13, 2004 11:49 pm
Gauge of song |
I am trying to make a gauge that tells me how far along my Winamp song is. I'll give you the entire script, not just for the gauge, because I think my problem isn't entirely with the gauge. I think I maybe am using the wrong variables or soemthing, I don't know.
#CLASS {zMUDampControl}
#ALARM {1} {
#var song @Winamp.CurrentSongTitle
#var songtime @Winamp.CurrentPos
#var songlength @Winamp.CurrentSongLength
#var status %case( @Winamp.Status+1, "Stopped", "Playing", "Unkown", "Paused")
}
#KEY F9 {
#call @Winamp.Rewind
#var currentsong @Winamp.CurrentSongTitle
#var songtime @Winamp.CurrentPos
#var songstatus %case( @Winamp.Status+1, "Stopped", "Playing", "Unkown", "Paused")
}
#KEY F10 {
#call @Winamp.FastForward
#var song @Winamp.CurrentSongTitle
#var songtime @Winamp.CurrentPos
#var songstatus
#var songstatus %case( @Winamp.Status+1, "Stopped", "Playing", "Unkown", "Paused")
}
#KEY F11 {
#if (@songstatus="Playing") {#call @Winamp.Pause} {#call @Winamp.Play}
#var song @Winamp.CurrentSongTitle
#var songtime @winamp.CurrentPos
#var songstatus %case( @Winamp.Status+1, "Stopped", "Playing", "Unkown", "Paused")
}
#KEY F12 {
#Call @Winamp.Stop
#var song @Winamp.CurrentSongTitle
#var songtime @Winamp.CurrentPos
#var songstatus %case( @Winamp.Status+1, "Stopped", "Playing", "Unkown", "Paused")
}
#KEY KEY1 {#var Winamp %comcreate( "WinampCOM.Application")}
#KEY KEY3 {#var Winamp ""}
#CLASS 0
And here is the gauge:
#BUTTON 6 {@song} {} {} {} {@songtime} {@songtime} {} {Size} {223} {19} {Pos} {0} {11} {32864} {} {Gauge||12|@songlength|@songlength|0} {} "" {Explore|Inset} {} {}
The gauge always shows up as being entirely yellow, which means that it's always full. It seems to think that my song is always done. |
|
_________________ *Llewlyn* makes a strange sound but is suddenly very silent as you place a silver sai in his back! |
|
|
 |
hykou Wanderer
Joined: 29 Apr 2004 Posts: 63 Location: USA
|
Posted: Sat Aug 14, 2004 2:47 am |
you should know when your song is done when it switches to the next 
|
|
|
 |
Loto Apprentice
Joined: 05 May 2003 Posts: 194
|
Posted: Sat Aug 14, 2004 3:41 am |
Meh, too lazy! Also this way I know what song I am listening too. :P
|
|
_________________ *Llewlyn* makes a strange sound but is suddenly very silent as you place a silver sai in his back! |
|
|
 |
Dumas Enchanter
Joined: 11 Feb 2003 Posts: 511 Location: USA
|
|
|
 |
Loto Apprentice
Joined: 05 May 2003 Posts: 194
|
Posted: Sat Aug 14, 2004 9:41 pm |
I know, that's the script I use. But I'm trying to add a gauge to it to show how far along the song is in a gauge. That has a button on it to show it, but I am trying to make a gauge to show it instaed of just numbers.
|
|
_________________ *Llewlyn* makes a strange sound but is suddenly very silent as you place a silver sai in his back! |
|
|
 |
Loto Apprentice
Joined: 05 May 2003 Posts: 194
|
Posted: Sun Aug 15, 2004 5:32 pm |
Bump
|
|
_________________ *Llewlyn* makes a strange sound but is suddenly very silent as you place a silver sai in his back! |
|
|
 |
Loto Apprentice
Joined: 05 May 2003 Posts: 194
|
Posted: Mon Aug 16, 2004 10:13 pm |
Shameful BUMP
Bump
Up
My
Post |
|
_________________ *Llewlyn* makes a strange sound but is suddenly very silent as you place a silver sai in his back! |
|
|
 |
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Tue Aug 17, 2004 4:20 am |
If your gauge is always full, then either @songtime or @songlength (or both) isn't changing or else you are using the smaller one for the gauge max and the larger one for the gauge value.
|
|
_________________ LightBulb
Senior member
Most scripts in this forum are written for Command Line entry.
Don't even open the Settings Editor unless its use is specified or obvious. |
|
|
 |
Loto Apprentice
Joined: 05 May 2003 Posts: 194
|
Posted: Tue Aug 17, 2004 6:09 am |
I tried both of those. They are both updated, but they have the wrong numbers in them, as far as I can tell. And I KNOW @songtime is supposed to be the smalelr variable. At the moment @songtime is equal to 115597 and @songlength is 191. The song is more than halfway over. It seems like @songlength is missing numbers three numbers off the end consistently, because when the song finished @songtime was equal to slightly more than 191000. I listened to another song to see what happens and @songtime=219561 and @songlength=220 with 1 second left. So it seems like @songlength is consistently missing the last three numbers. Is there anyway I can fix this?
|
|
_________________ *Llewlyn* makes a strange sound but is suddenly very silent as you place a silver sai in his back! |
|
|
 |
Vijilante SubAdmin

Joined: 18 Nov 2001 Posts: 5187
|
Posted: Tue Aug 17, 2004 9:57 am |
It would seem that @songtime is is being measured in milliseconds, but @songlength is in seconds. Simply multiply by 1000 when setting @songlength or divide by 1000 when setting @songtime.
|
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums |
|
|
 |
Loto Apprentice
Joined: 05 May 2003 Posts: 194
|
Posted: Tue Aug 17, 2004 5:18 pm |
Great! It works now, thanks a lot!
|
|
_________________ *Llewlyn* makes a strange sound but is suddenly very silent as you place a silver sai in his back! |
|
|
 |
|
|