Posted by member 302889 on 2006-06-09 10:37:59 link

for some reason half of my post was missing. here it is again...

Hi all,

i've written this code to mute winamp but it doesnt seem to be working correctly. can someone offer some advice?

At the start of my script file i set a var to say whether winamp is muted or not

*Script var ampMuted "0"

Then i have this script to take the current value of winamps volume from xlabel, save it in a var and then mute winamp by setting volume to 0. If winamp is already muted (ampMuted = 1) then it should take the current value from before it was muted and set the volume of winamp to that value and return the ampMuted var to 0.

*Script bang !ampMute
*Script gotoif ("%{ampMuted}" = "1") muted
*script exec !varset currentvol "[volume()]"
*script exec !Amp_SetVolume 0
*script exec !varset ampMuted 1
*Script exit
*Script label muted
*script exec !Amp_SetVolume {currentvol}
*script exec !varset ampMuted 0
*Script ~bang

All that happens when i use this script is that the volume of winamp is lowered to 14% (which is a weird number for it to be lowered to) and when i try to unmute it nothing happens.

Can someone tell me where my scripting is going wrong?

i am using dynamp 0.43, xlabel 3.6, and mzscript 0.8.6l.

cheers