HotVoice icon indicating copy to clipboard operation
HotVoice copied to clipboard

Help with making script

Open myhre124 opened this issue 2 years ago • 0 comments

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

myhre124 avatar Jul 30 '23 17:07 myhre124