Mr wrote on Jun 5
th, 2014 at 8:41pm:
I don't get it...
Olath's original post, because I'm feeling chaotic:
alright... so... im almost done with my own script... however... i want to put in an If "yxz" is found, then do {THIS} Else do "{ThIs}... naturally.. its easier to see what i want.. done.. so... here..
enterquest()
{
; Locate Door Loop
while (1=1)
{
ImageSearch, PX,PY,0,0,%A_ScreenWidth%,%A_ScreenHeight%, *60 %A_Desktop%\ddobot\Door.png
if ErrorLevel = 0
{
Click %PX%, %PY%
break
}
}
; Find the EE Button
while (1=1)
{
ImageSearch, PX,PY,0,0,%A_ScreenWidth%,%A_ScreenHeight%, *60 %A_Desktop%\ddobot\EEButton.png
if ErrorLevel = 0
{
Click %PX%, %PY%
break
}
}
; Find the Enter Button
while (1=1)
{
ImageSearch, PX,PY,0,0,%A_ScreenWidth%,%A_ScreenHeight%, *60 %A_Desktop%\ddobot\EnterButton.png
if ErrorLevel = 0
{
Click %PX%, %PY%
break
}
}
; Wait until instance loads
; Find the In Button
while (1=1)
{
ImageSearch, PX,PY,0,0,%A_ScreenWidth%,%A_ScreenHeight%, *60 %A_Desktop%\ddobot\In.png
if ErrorLevel = 0
{
break
}
}
}
Alright.. as you can see.. this will open the door Ui, click EE button, click enter.. and then wait until image search finds an image, indicating you have loaded in...
What i want.. is if perchance lag causes the door to NOT open after clicking it (lag yah know.. badass bitch it is Cheesy) then to repeat the sequence until it does open... Anyone?.... i did all the hard work.... i just want to make it better.... Undecided