A bit new to this, but from my understanding, AHI.SendKeyEvent(keyboardId, GetKeySC("1"), 1) is able to send "1", but I am having troubles figuring out how i can hold "1" for a specific amount of time without using Send. Here is a part of my code :
Code: Select all
#SingleInstance force
#Persistent
#include <AutoHotInterception>
time := 200
AHI := new AutoHotInterception()
keyboardId := AHI.GetKeyboardId(0x03F0, 0x0591)
AHI.SubscribeKey(keyboardId, GetKeySC(CurrentTap), false)
hotkey, w, function ;just a testing hotkey
return
function:
AHI.SendKeyEvent(keyboardId, GetKeySC(CurrentTap), 1)
;--- perhaps a code that loops AHI.SendKeyEvent? I need to make it hold for %time% amount
return