-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDD_Send_G.au3
More file actions
36 lines (29 loc) · 804 Bytes
/
DD_Send_G.au3
File metadata and controls
36 lines (29 loc) · 804 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#include <Constants.au3>
; Author: Kalbintion
; Desc: Repeatedly sends the 'g' key to the game Dungeon Defenders
; when it is the active window.
Local $winTitle = "Dungeon Defenders"
Local $isFound = false
Local $iCount = 0
AutoItSetOption("SendKeyDownDelay", 50)
Do
waitForActiveWindow($winTitle)
ConsoleWrite($iCount & @CRLF)
Send("g")
Sleep(2000)
$iCount = $iCount + 1
Until $iCount = 0
Func waitForActiveWindow($title)
$isFound = false
If WinGetTitle("[ACTIVE]") = $winTitle Then
Else
ConsoleWrite("Waiting for active window: " & $winTitle & @CRLF)
Do
Local $winTitle = WinGetTitle("[ACTIVE]")
If $winTitle = $title Then
$isFound = true
EndIf
Until $isFound = true
ConsoleWrite("Active window found: " & $winTitle & @CRLF)
EndIf
EndFunc