Rorka Posted July 23, 2009 Share Posted July 23, 2009 (edited) Hello, I am wanting to Left click when it notices a specified colour. I want it to Left Click when it notices this: untitled.bmp Here is the code i am using. It just sits there and does nothing: Sleep(5000) ; Gives me time to find move mouse. $ifblack = PixelGetColor(MouseGetPos( 0 ) , MouseGetPos( 1 )) While 1 If $ifblack = 0x20110F Then MouseClick("Left") Sleep(2000) EndIf WEnd Please help? EDIT: Forgot code Edited July 23, 2009 by Rorka Link to comment Share on other sites More sharing options...
KaFu Posted July 23, 2009 Share Posted July 23, 2009 Sooooo... where's the code? OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2022-Nov-26) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Feb-16) HMW - Hide my Windows (2018-Sep-16) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2023-Jun-03) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) Link to comment Share on other sites More sharing options...
Rorka Posted July 23, 2009 Author Share Posted July 23, 2009 Sooooo... where's the code?Added to first post.My bad, sorry Link to comment Share on other sites More sharing options...
bogQ Posted July 23, 2009 Share Posted July 23, 2009 Added to first post. My bad, sorry try like this Sleep(5000) ; Gives me time to find move mouse. While 1 $xy = MouseGetPos() $ifblack = Hex( PixelGetColor($xy[0],$xy[1]) ,6) If $ifblack= "20110F" Then MouseClick("Left") Sleep(2000) EndIf WEnd TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost. 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