Shift Up don't work with IfWinNotActive in loop

Ask gaming related questions
K0MPOT1K
Posts: 4
Joined: 05 Mar 2018, 15:04

Shift Up don't work with IfWinNotActive in loop

05 Mar 2018, 15:10

When I exit the game I hear a signal, but shift remains pressed.

Code: Select all

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}
		SoundBeep, 500, 200
	} else {
		Send, {Shift Up}
		SoundBeep, 1000, 200
	}
return
Tell me what I did wrong ?
K0MPOT1K
Posts: 4
Joined: 05 Mar 2018, 15:04

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

06 Mar 2018, 20:29

Is that such a difficult question ?
K0MPOT1K
Posts: 4
Joined: 05 Mar 2018, 15:04

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

09 Mar 2018, 16:27

Help me please...
User avatar
gregster
Posts: 1481
Joined: 30 Sep 2013, 06:48

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

18 Mar 2018, 19:39

Try to cut down/modify the code to something that creates a reproducable problem. Do you see the same problem with other programs?

Return to “Gaming”

Who is online

Users browsing this forum: Bing [Bot] and 29 guests