Search found 8 matches

by K0MPOT1K
24 Nov 2020, 08:23
Forum: Ask for Help (v1)
Topic: Listen to keystrokes during script execution
Replies: 12
Views: 3331

Re: Listen to keystrokes during script execution

With that code, KeyPress() is never getting called because you changed the signature - you have 4 parameters (extra type parameter) instead of 3 Looks like I have slightly different class from another thread. class AllKeyBinder{ __New(callback, pfx := "~*"){ static mouseButtons := ["LButton", "RBut...
by K0MPOT1K
19 Nov 2020, 10:44
Forum: Ask for Help (v1)
Topic: Listen to keystrokes during script execution
Replies: 12
Views: 3331

Re: Listen to keystrokes during script execution

It doesn't seem to work. Here is a simple example: kb := new AllKeyBinder(Func("KeyPress"), "~+") KeyPress(type, code, name, state) { Tooltip % "Type: " type ", Code: " code ", Name: " name ", State: " state } #IfWinActive ahk_class Notepad++ F1:: MsgBox, F1 Pressed return #IfWinActive In this examp...
by K0MPOT1K
19 Nov 2020, 10:30
Forum: Ask for Help (v1)
Topic: Listen to keystrokes during script execution
Replies: 12
Views: 3331

Re: Listen to keystrokes during script execution

By default it won't block the keys (Allowing existing shortcuts to work) There's an optional 2nd parameter ("pfx") that is used as a prefix for all hotkeys it declares, and it defaults to ~ This can be overridden in the constructor eg kb := new AllKeyBinder(Func("MyFunc"), "*") to make keys block a...
by K0MPOT1K
18 Nov 2020, 21:32
Forum: Ask for Help (v1)
Topic: Listen to keystrokes during script execution
Replies: 12
Views: 3331

Re: Listen to keystrokes during script execution

You would need to declare a hotkey to every key on the keyboard. When wishing to send input to an inactive window, the first port of call should be the ControlSend command. Be aware though that ControlSend does not work with all apps To bind a hotkey to all keys, you can use this code: #SingleInsta...
by K0MPOT1K
06 Mar 2018, 20:29
Forum: Gaming Help (v1)
Topic: Shift Up don't work with IfWinNotActive in loop
Replies: 4
Views: 820

Re: Shift Up don't work with IfWinNotActive in loop

Is that such a difficult question ?
by K0MPOT1K
05 Mar 2018, 15:10
Forum: Gaming Help (v1)
Topic: Shift Up don't work with IfWinNotActive in loop
Replies: 4
Views: 820

Shift Up don't work with IfWinNotActive in loop

When I exit the game I hear a signal, but shift remains pressed. SprintToggle := 0 loop { IfWinNotActive, Fortnite { if (SprintToggle) { Send, {Shift Up} SoundBeep, 1500, 200 SprintToggle := 0 } } Sleep, 1000 } #IfWinActive Fortnite Shift:: if (SprintToggle := !SprintToggle) { Send, {Shift Down} Sou...

Go to advanced search