OK thx
That was it !!!
BUT
while now the F12 is felt :
with the NOT .. as you suggested
the Mic doesn't stay up but go up and down when I keep pressing
without the NOT
it goes up once when I hit it and nothing more even If I keep pressing
I tried to make interval longer but it's just slowing down the flip flop
Yes, I programmed some ..
AlainCh (25 years ago
These are some tests ..
then I changed key and debugged
. no value for the key seems to come inside but only once
_____________________________ Got Flip Flop
F12::
SoundGet,micvol,Microphone:2,Volume
ToolTip,Mic is On
SoundSet,100,Microphone:2,Volume
Loop
{
Sleep,100
If not GetKeyState(F12,P)
Break
}
ToolTip,Mic is Off
SoundSet,0,Microphone:2,Volume
Sleep,2000
ToolTip,
Return
___________- Tried this one from the Original script (Same Result flip flop)
F12::
SoundGet,micvol,Microphone:2,Volume
ToolTip,Mic is On
SoundSet,100,Microphone:2,Volume
Loop
{
Sleep,100
GetKeyState,states,F12,P
; GetKeyState,state,S,P
; states=%states%%state%
IfInString,states,U
Break
}
ToolTip,Mic is Off
SoundSet,0,Microphone:2,Volume
Sleep,2000
ToolTip,
Return
_______________ THis IS debug
As you'll see, The GetKeyState function
is not getting any value for the key :-((
_______________
NumpadIns::
Loop
{
PINS := GetKeyState(NumpadIns,P)
; MsgBox % "-" PINS "-"
sleep,100
If % PINS
{
ToolTip,Mic is On
SoundSet,100,Microphone:2,Volume
Sleep,1000
; Tooltip,
}
Else
{
ToolTip,Mic is Off
SoundSet,0,Microphone:2,Volume
Sleep,200
; ToolTip,
}
Break
}
Count+= 1
ToolTip, " Loop> " %count%
Return