-
Notifications
You must be signed in to change notification settings - Fork 0
/
Blind_Pick.ahk
72 lines (61 loc) · 1.39 KB
/
Blind_Pick.ahk
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
#Include FindClick.ahk
Gui, Add, DropDownList, vChamp,
Gui, Add, Button, vArm gChampSelected, Arm
Gui, Add, Button, vDisarm gCancelChamps, Disarm
Gui, Add, Button, x90 y40 vReload gLoadChamps, Reload
GuiControl, disable, Disarm
Gui, Show, w260 h100, Blind Picker
Gosub LoadChamps
Loop
{
if Armed
Gosub ChampSelectedLoop
Sleep, 2
}
return
LoadChamps:
{
ArrayCount = 0
ChampList = |
Loop, Champ_Lowers\*.png
{
ArrayCount += 1
Temp := A_LoopFileName
SplitPath, Temp, , , , Temp
ChampList .= Temp . "|"
if a_index = 1
ChampList .= "|"
}
GuiControl,,Champ, %ChampList%
return
}
CancelChamps:
{
Armed := false
GuiControl, disable, Disarm
GuiControl, enable, Arm
return
}
ChampSelected:
{
GuiControl, disable, Arm
GuiControl, enable, Disarm
Gui, Submit, NoHide
Armed := true
return
}
ChampSelectedLoop:
{
Temp = Champ_Lowers\
Temp = %Temp%%Champ%
Temp .= `.png
if(FindClick(Temp))
GoSub CancelChamps
return
}
GuiClose:
ExitApp