Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
Loto
Apprentice


Joined: 05 May 2003
Posts: 194

PostPosted: 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!
Reply with quote
hykou
Wanderer


Joined: 29 Apr 2004
Posts: 63
Location: USA

PostPosted: Sat Aug 14, 2004 2:47 am   
 
you should know when your song is done when it switches to the next Razz
Reply with quote
Loto
Apprentice


Joined: 05 May 2003
Posts: 194

PostPosted: 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!
Reply with quote
Dumas
Enchanter


Joined: 11 Feb 2003
Posts: 511
Location: USA

PostPosted: Sat Aug 14, 2004 3:18 pm   
 
Someone already created something for WinAmp and Zmud

http://forums.zuggsoft.com/phpbb/viewtopic.php?t=16787
Reply with quote
Loto
Apprentice


Joined: 05 May 2003
Posts: 194

PostPosted: 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!
Reply with quote
Loto
Apprentice


Joined: 05 May 2003
Posts: 194

PostPosted: 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!
Reply with quote
Loto
Apprentice


Joined: 05 May 2003
Posts: 194

PostPosted: 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!
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: 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.
Reply with quote
Loto
Apprentice


Joined: 05 May 2003
Posts: 194

PostPosted: 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!
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5187

PostPosted: 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
Reply with quote
Loto
Apprentice


Joined: 05 May 2003
Posts: 194

PostPosted: 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!
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net