Code review
Posted: 27 Mar 2024, 06:37
Hello, I want to create simple autohotkey scripts with operators else and if. I want to make script which get pixel color from Xpos, and Ypos and then if false take action (send keystroke) or if true go to another function. Please check my code and reviev it. I think it should works but cant test it now.
[Mod action: Moved topic to the v1 section since this is v1 code. The main section is for v2.]
Code: Select all
#Persistent
SetTimer, KolorCheck, 250
return
HealOne:
PixelGetColor, kolor, Xpos, Ypos
if (kolor != 0xFF0000) {
Send, {F5}
} else {
HealTwo()
}
return
HealTwo()
PixelGetColor, kolor, Xpos, Ypos
if (kolor !=0xFF0000) {
Send, {F7}
} else {
ManaHeal
}
return
ManaHeal()
PixelGetColor, kolor, Xpos, Ypos
if (kolor !=0xFF0000) {
Send, {F3}
} else {
HealOne()
}
return
[Mod action: Moved topic to the v1 section since this is v1 code. The main section is for v2.]