need help

01/08/2009 10:35 Darkyy#1
Does anyone know why this auto potter isnt working ;\ written in ahk

Code:
#Persistent
#IfWinActive, [Conquer2.0]

PixelSearch, Px, Py, 32, 690, 36, 694, 0x0F078F, 10, Fast
if ErrorLevel 3
sleep 1000
else
click {F10}
0x0F078F is supposed to be the color of the hp bar
the co ords are somewhere at the pot
errolevel 3 because i want it to click F10 if it doesnt find it
:\ and it isnt working can anyone help ?
01/08/2009 12:33 Evan Lim#2
Darkyy@
yea...i did mention last time when u ask it
u are missing a loop
right now the program will only run the pixelsearch command once and stop
and u forgot to put a equal sign between ErrorLevel and 3
and according to the AHK documentation, there does not exist Errorlevel 3 for pixelsearch
and click has nothing to do with F10
click command only works for left, right middle clicks, not keyboard keystrokes, it should be "send {f10}"

correct format:
Code:
loop
{
 IfWinActive, [Conquer2.0]
 {
 PixelSearch, Px, Py, 32, 690, 36, 694, 0x0F078F, 10, Fast
 if ErrorLevel = 1
 send {f10}
 }
sleep 1000
}
dont invent new syntax oor parameters, its guarantee not working
instead, follow closely to the help file examples, do some copy and paste for testing purpose
overall, good try, every one has to start their first step in somewhere
01/08/2009 17:58 Darkyy#3
Quote:
Originally Posted by Evan Lim View Post
Darkyy@
yea...i did mention last time when u ask it
u are missing a loop
right now the program will only run the pixelsearch command once and stop
and u forgot to put a equal sign between ErrorLevel and 3
and according to the AHK documentation, there does not exist Errorlevel 3 for pixelsearch
and click has nothing to do with F10
click command only works for left, right middle clicks, not keyboard keystrokes, it should be "send {f10}"

correct format:
Code:
loop
{
 IfWinActive, [Conquer2.0]
 {
 PixelSearch, Px, Py, 32, 690, 36, 694, 0x0F078F, 10, Fast
 if ErrorLevel = 1
 send {f10}
 }
sleep 1000
}
dont invent new syntax oor parameters, its guarantee not working
instead, follow closely to the help file examples, do some copy and paste for testing purpose
overall, good try, every one has to start their first step in somewhere
thanks ill try it now
that was basicly my first try to do an auto program