ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Finished Programs

DONE: Push2Talk

<< < (5/7) > >>

AlainCh:
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

jgpaiva:
Oh.. Sorry, my fault. I see you had lots of work trying stuff out.
Actually, ahk's sintax has this smal pecularity: when you want to pass a constant argument to a function and not a variable, you must enclose it in quotes. This means the correct way to do it is the following:

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

AlainCh:
OK .. THX

but it still do the flip flop
 Strange behaviour :-((
 

I tried the three sample I put in the post .. no way !!

Hard..
AlainCh ( ...NUT

PS ::  Please give a try to the attached NUMPADins

jgpaiva:
What do you mean by "flip-flop"?  if you keep F12 pressed it won't keep the mic on?

AlainCh:
try this with the volume control open
and look the mic cursor

AlainCh (please

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version