-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompanion.ahk
88 lines (72 loc) · 1.38 KB
/
companion.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
#SingleInstance, Force
SendMode Input
SetWorkingDir, %A_ScriptDir%
Global DelayTime = 75
Global Kill = False
Global Running = False
#MaxThreadsPerHotkey, 2
q::
Kill = True
SplashTextOn, 150,, Terminate called.
If (Not Running) {
ExitApp
}
Return
a::
Running = True
MsgBox, 1,, Open your ComputerCraft window`, then open your editor window.
IfMsgBox, Cancel
Return
AT(count) {
Send, {LAlt Down}
Loop, %count% {
Sleep, %DelayTime%
Send, {Tab}
}
sleep, %DelayTime%
Send, {LAlt Up}
sleep, %DelayTime%
}
COPY() {
Send, {LCtrl Down}
Sleep, %DelayTime%
Send, l
Sleep, %DelayTime%
Send, c
Sleep, %DelayTime%
Send, {LCtrl Up}
Sleep, %DelayTime%
}
PASTE() {
Send, {LCtrl Down}
Sleep, %DelayTime%
Send, v
Sleep, %DelayTime%
Send {LCtrl Up}
Sleep, %DelayTime%
}
SplashCountdown(seconds, message) {
count = %seconds%
Loop, %seconds% {
SplashTextOn, 500,, %message% `(%count% seconds`).
count -= 1
Sleep, 1000
}
SplashTextOff
}
SplashCountdown(5, "Set your cursor at the top left of your code!")
SplashTextOn,500,, Hold `'q`' until the program stops to end.
Loop, 2000 {
COPY()
AT(1)
PASTE()
AT(1)
Send, {Right}
if (Kill) {
Break
}
}
SplashTextOn,,, Stopped!
Sleep, 1000
SplashTextOff
ExitApp