IfWinActive ahk_exe gta_sa exe SingleInstance Force NoEnv NickName Som

 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
#IfWinActive, ahk_exe gta_sa.exe
#SingleInstance Force
#NoEnv
NickName := "Som_Mercenary"
numberPhone := 991100
chatlog := A_MyDocuments "vkLOG"
z := 0
ans := 0
lastOutPut := ""
Loop {
GetChatLogLine(0, output)
If (RegExMatch(output, "VkBot")){
if(lastOutPut != output) {
lastOutPut := output
z := z+1
}
}
If (RegExMatch(output, "(VkBot) (.*)\[(\d{1,3})\] для", m)){
if(m2 == NickName) {
if(lastOutPut != output) {
lastOutPut := output
ans := ans+1
}
}
}
}
F1::
z := 0
ans := 0
return
F11::
SendMessage, 0x50,, 0x4190419,, A
sendSMS(numberPhone, "Текущее кол-во /ans: "ans)
sendSMS(numberPhone, "Текущее кол-во /z: "z)
return
GetChatLogLine(Line, ByRef Output, timestamp=0, color=0) {
chatindex := 0
FileRead, file, %A_MyDocuments%"\VKlog
loop, Parse, file, `n, `r
{
if(A_LoopField)
chatindex := A_Index
}
loop, Parse, file, `n, `r
{
if(A_Index = chatindex - line){
output := A_LoopField
break
}
}
file := ""
if(!timestamp)
output := RegExReplace(output, "U)^\[\d{2}:\d{2}:\d{2}\] ")
if(!color)
output := RegExReplace(output, "Ui)\{[a-f0-9]{6}\}")
return
}
sendSMS(phone, message) {
sendInput, {F6}/ahelp{Enter}
}