Help with making script
Hi I really have very little knowledge to coding but i have tried my best to get this script i found online to work but cant. I would to make a click and hold keystroke for example the space bar when my microphone detects an volume above for example 50% and then release once there is a volume above 50% again. Here is the script i found online for HotVoice but it doesnt seem to work.
#SingleInstance force #Persistent
; Load the HotVoice Library #include Lib\HotVoice.ahk
; Create a new HotVoice class hv := new HotVoice()
; Subscribe to volume change event hv.SubscribeVolume(Func("OnMicVolumeChange"))
OnMicVolumeChange(state){ static activated := 0 static threshold := 50 ToolTip % "Volume: " state if (!activated && state >= threshold){ ; If volume over threshold ... Send {Space} ; ... press the space bar activated := 1 } else if (activated && state < threshold){ activated := 0 } }
I hope someone can help me make a script that can do what i am looking for if it is possible with HotVoice.
Thanks
Frederik