Chimerians Posted January 28, 2018 Share Posted January 28, 2018 Hi guys I need help with my pixel script, I cant get it working. The script runs, but nothing is done, I want the script to press F10 when both coordinates get the same colour, if 1 colour is different, then it wont do anything. Can someone helpme with this? what did I do wrong? WinActive("cmedu.exe") #include "misc.au3" ;_sendEx("keys");$keys will not be sent until CTRL, ALT, SHIFT are released back into the wild Func _SendEx($keys) While _IsPressed("10") Or _IsPressed("11") Or _IsPressed("12") sleep(50) WEnd Send($keys) EndFunc;==>_SendEx Global $xp95 = PixelGetColor(1296, 125) Global $yp90 = PixelGetColor(1291, 141) While 1 If $xp90 = 0x686868 And $yp90 = 0x686868 Then If not @error Then _SendEx("{F10}") sleep(200) EndIf EndIf WEnd sleep(50) Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted January 28, 2018 Moderators Share Posted January 28, 2018 @Chimerians it is difficult to troubleshoot with no more explanation than "nothing is done". How about a detailed description of the app or site you're trying to automate, and what the script should do. PixelGetColor is among the less reliable ways of doing things in AutoIt; there is almost certainly an easier way to accomplish what you're after. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now