-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathscumautomessage_windowed.ahk
101 lines (87 loc) · 1.65 KB
/
scumautomessage_windowed.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
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
/**
* scum auto messages AHK script WINDOWED MODE VERSION
*
* Requirements: AutoHotkey (v1.1+)
* SCUM IN WINDOWED MODE
*
* Use:
* Control+M activate / deactivate
*
* by GAMNEBotLand.com
*/
#NoEnv
#Singleinstance Force
SetTitleMatchMode, 2
SetControlDelay -1
global comando1, tiempo1, m, msg, toggle1,clipboardold
tiempo1 := 5 ;await minutes every message
pastebin := "https://pastebin.com/raw/QxgHJ1BN"
toggle1 := false
tiempo1 := tiempo1 * 60000
m :=1
comando1:=[]
leermensajes()
m:=1
^M::
toggle1:=!toggle1
If (toggle1)
{
toggle1:=true
Traytip, scumautomessage,ACTIVATED, 5, 1
Sleep, 3000
SetTimer, enviar_comandos, %tiempo1%
}
else
{
toggle1:=false
Traytip, scumautomessage,DEACTIVATED, 5, 1
Sleep, 3000
SetTimer, enviar_comandos, off
}
enviar_comandos:
If (toggle1)
{
Sleep 100
clipboardold:=clipboard
Sleep 100
clipboard:=""
Sleep 100
clipboard:=comando1[m]
Sleep 100
ControlSend, , t{Ctrl down}a{Ctrl up}{Ctrl down}v{Ctrl up}, SCUM
clipboard:=clipboardold
Sleep 100
ControlSend, ,{Enter}, SCUM
Sleep 100
ControlSend, ,{Enter}, SCUM
Sleep 100
m++
if (m>comando1.MaxIndex())
{
m:=1
leermensajes()
}
}
Sleep 100
return
leermensajes() {
local strmensajes,whr
try {
whr := ComObjCreate("WinHttp.WinHttpRequest.5.1")
ComObjError(0)
whr.Open("GET", pastebin, true)
whr.Send()
whr.WaitForResponse(2)
strmensajes := whr.ResponseText
ObjRelease(whr)
} catch e {
return
}
n:=1
Loop, parse, strmensajes, `n, `r
{
comando1[n]:=A_LoopField
n++
}
return
}