-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathchkranks.ahk.bak
114 lines (106 loc) · 2.47 KB
/
chkranks.ahk.bak
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
#SingleInstance, Force
#include <tf>
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
CoordMode Pixel, Screen
CoordMode Mouse, Screen
SetTitleMatchMode, 2
global Users:=[]
,output12:=[],ha:=[]
Str = zbc
file_write2 := "!C:\Python Scripts\pythoncsgoinfo\masteroutput.csv"
indexing = 1
Loop, Read,C:\Python Scripts\pythoncsgoinfo\masteroutput.csv
{
la := A_LoopReadLine
if la
{
la := RTrim(A_LoopReadLine)
,ha := StrSplit(la, ",")
if(ha.MaxIndex() = 7)
{
output12.Push(la)
; OutputDebug,in %la% `n
}
Else if(ha.MaxIndex() = 8)
{
output12.Push(la)
OutputDebug,in %la% `n
}
; Else
; OutputDebug,out %la% `n
}
}
dubUsers:=[]
Loop, % output12.MaxIndex()
{
haa := output12[A_Index]
;OutputDebug, %haa% `n
ha := StrSplit(haa, ",")
;OutputDebug ............................................................................................................................................. `n
Str := ha[4] ;win
OutputDebug %Str% `n
d := dubVal(output12,Str)
w := HasVal(dubUsers,Str)
OutputDebug d=%d% w=%w% `n
if ( w = 0)
{
users.Push(haa)
dubUsers.Push(haa)
}
else
{
Str1 := dubUsers[w]
OutputDebug new=%haa% `nold=%str1% `n
if (haa > str1)
{
v := HasVal(users,Str)
users[v]:=haa
}
else if (haa < str1)
{
v := HasVal(users,Str)
users[v]:=Str1
}
}
; dubUsers.Push(haa)
}
output12:=[]
file_write := "!\\2700-PC\C\DLL\masteroutput.csv"
FileDelete,\\2700-PC\C\DLL\masteroutput.csv
Loop, % users.MaxIndex()
{
haa := Users[A_Index]
FileAppend,%haa% `n,\\2700-PC\C\DLL\masteroutput.csv
}
hasVal(haystack, needle) {
if(!isObject(haystack))
return false
if(haystack.Length()==0)
return false
for k,v in haystack
{
IfInString,v, %needle%
{
return k
}
}
return false
}
dubVal(haystack, needle) {
count = 0
if(!isObject(haystack))
return false
if(haystack.Length()==0)
return false
for k,v in haystack
{
IfInString,v, %needle%
{
count++
if count = 2
return k
}
}
return false
}