Skip to content
This repository was archived by the owner on Aug 10, 2025. It is now read-only.

Commit fb93ebe

Browse files
authored
Some slight code improvements (#22)
* Some slight code improvements - TrayTips now have New Lines. - Changes syntax to match throughout the whole script. Calls like TrayTip, MsgBox, and others are called with parenthesis. - Keywords like For, If, Else, Catch, have all been capitalized to match and improve consistency across the script. * Requested Changes
1 parent c93993e commit fb93ebe

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

AFB.ahk

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,18 @@ FileInstall("data\reconnect-text.png", RECONNECT_TEXT_IMG, 1)
2222
globals
2323
*/
2424
IsRunning := false
25-
SetTrayTip("Script is ready for input. Anti-kick is disabled.")
25+
SetTrayTip("Script is ready for input.`n`nAnti-kick: Disabled")
2626

2727
#MaxThreadsPerHotkey 2
2828
F1:: {
2929
global IsRunning := !IsRunning
30-
If (IsRunning) {
31-
SetTrayTip("Anti-kick is enabled.")
32-
} Else {
30+
if (IsRunning) {
31+
SetTrayTip("Anti-kick: Enabled")
32+
} else {
3333
Reload()
3434
}
3535

36-
While (IsRunning) {
36+
while (IsRunning) {
3737
lastID := WinExist("A")
3838
robloxID := WinExist("Roblox")
3939
if (robloxID) {
@@ -90,8 +90,8 @@ Reconnect(winWidth, winHeight) {
9090
}
9191
}
9292
} catch as err {
93-
MsgBox "Something went wrong when trying to check for reconnect button:`n" err.Message
94-
Reload
93+
MsgBox("Something went wrong when trying to check for reconnect button:`n" err.Message)
94+
Reload()
9595
}
9696
return 0
9797
}
@@ -128,7 +128,7 @@ ClickImageMidPoint(imageFile, xOffset, yOffset){
128128

129129
; ! Clicks seems to be flakey, this is why using two Click() instead of the 3rd parameter
130130
Click(clickX, clickY)
131-
sleep(350)
131+
Sleep(350)
132132
Click(clickX, clickY)
133133
}
134134

0 commit comments

Comments
 (0)