PDA

View Full Version : Scripts to hell


jakov.sosic
20th October 2001, 09:09
Is there any way to implement MUTE function into Winamp3?
I need it for 2 skins, but main problem is that I want VolumeSliders
to stay the same when I mute volume, not to change to 0% value.

And also I have a problem with mouse scroll button.
Mute button stays on, and I scroll, but volume goes up....

Any idea to solve MUTE problem without forcing Winamp to set Volume to zero?

Lucas
20th October 2001, 14:14
You can do that using scripting. Like you define a variable to know that mute is on or off and you store the current volume in another until you reset the mute. Then whenever you change the volume you could do a check like:

if (!MuteIsOn) {
System.setVolume(Value);
}
else {
System.setVolume(0);
}

Also, don't forget to make your own System.onVolumeChanged(int) and you could reset the volume to the value you kept in a variable when mute is activated.

I think there's no mute function just yet, so you'll have to reset volume to 0 and store the old volume value in a variable.

If you want my opinion, I wouldn't prevent the user from playing with the volume slider. You could just set the volume to 0 when it's muted and when the mute is desactivated simply reset the volume by the current position of the slider, but that's my idea :)

-L

jakov.sosic
21st October 2001, 18:47
thanx for your opinion, but I already used that solution, and it doesn't work because I want to play with sliders :rolleyes:
But nevermind, I just hope that they will implement Mute function in
Winamp :)
Come on Justin! Please!

Lucas
21st October 2001, 19:17
i made some test and it works.

-L

Naamloos
21st October 2001, 19:21
He wanted to mute, not set the volume slider at 0...

I don't think they will implent this :)

Lucas
21st October 2001, 19:34
mute = no volume
setting volume to 0 = no volume

that's a great emulation until we have a real one if you ask me.

*smack*

-L

Gonzotek
21st October 2001, 21:56
Right.

On top of that you could always put another image over the slider when "mute" is on denoting the volume that will be restored when unmuted. That plus a staus message would, in full effect, be a mute function.

SarCaSM
21st October 2001, 23:10
Originally posted by jakov.sosic
Come on Justin! Please!

Is it me, or does Justin not really work on WA3?

Gonzotek
22nd October 2001, 01:48
To the best of my knowledge, he's not directly involved with it. But I'd bet he doesn't run screaming from the room every time the topic comes up, if you know what I mean.

-=Gonzotek=-

lunarboy1
23rd October 2001, 01:13
why don't you have the slider not directly work with the system. It will just be a plain slider that you would get values from and report to the system through scripts, not through build in system action functions.

jakov.sosic
24th October 2001, 18:41
I already have that kind of slider, but problem comes WITH MOUSE.
If I scroll the mouse (i have a mouse with scroll ball) then volume changes, and that is what's making problems to me...
Do you guys want whole script ?
Maybe someone can help....