Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

Need Advice

$
0
0
Alright i'm new to AutoIT, but so far i'm having a lot of fun with a project.

The goal with my script, is to have pixelgetcolor on a loop, looking for changes at 2 different cords, if the color matches, i want it to do X until the color changes then i want it to do Y.

I managed to do this fine with just IF/Else, i ran into problems when i added my second part of coding, that introduced the second pixelgetcolor loop,

Now i was not exactly sure how to use IF/Else for this, seeing as i have more then 2 statements, and IF/Else seems to my limited knowledge to allow for 2 (or 3 with if elseif, else)

Here is the majority of the code, the reason for all the sleep, is i have been looping both the If/Else statements in a While(9999999999) loop, and it seems to be really laggy, the sleep helped,

Any suggestions as to how to do this more effectively ?

[ autoit ]         
ToolTip("info", 0, 0) Sleep(250) Sleep(3000) ToolTip("") Sleep(250) $b = "121455" $var = "16711680" Sleep(250) Sleep(250) Local $px = PixelGetColor(473, 358) Sleep(250) If $px == $var Then Sleep(250) Sleep(250) $x MouseClick("left") Sleep(700) Else Sleep(250) Send("{h down}") Sleep(250) Sleep("1000") ToolTip("You have no valid target, You Inbred") EndIf Sleep(250) $c = PixelGetColor(432, 22) Sleep(250) Sleep(250) If $c == $b Then Sleep(250) Send("{h down}") Sleep("1000") Send("{h up}") Else Sleep(250) ToolTip("a message") Sleep(250) ToolTip("") EndIf

Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>