Skip to content

Commit

Permalink
Fixed hotkeys sometimes crashing D2Stats
Browse files Browse the repository at this point in the history
  • Loading branch information
Kyromyr committed Jan 27, 2017
1 parent af482a8 commit 626ad88
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions D2Stats.au3
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,7 @@ OnAutoItExitRegister("_Exit")
HotKeySet("+{INS}", "printstatvalue")
HotKeySet("{INS}", "copyitem")
HotKeySet("{DEL}", "copyilvl")
local $hotkeyactive = 1
While 1
$msg = GUIGetMsg()
Select
Expand Down Expand Up @@ -428,10 +429,17 @@ Func readchardata()
EndIf
EndFunc
func hotkeycheck()
if (not $hotkeyactive) then
return 0
endif

if (WinActive("[CLASS:Diablo II]")) then
return 1
endif

$hotkeyactive = 0
ControlSend("[ACTIVE]", "", "", @HotKeyPressed)
$hotkeyactive = 1
return 0
endfunc
Func copyitem()
Expand Down

0 comments on commit 626ad88

Please sign in to comment.