Script Help

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
kleankanteen
Posts: 1
Joined: 19 Feb 2018, 03:42

Script Help

19 Feb 2018, 03:51

I have a script I am working on and I have not have a chance to test it out yet because I am not at the right computer.

The idea behind the script is this. While holding down left mouse click, it will (continuously) scan a certain area for a certain pixel color. If that color is detected it will release left mouse click.

This is what I have so far, the X,Y cords and color is generic here because I don't have the right ones yet, but I can figure out those on my own.

Code: Select all

LButton::
CoordMode, pixel,screen
CoordMode, mouse,screen 
 Loop 
 { 
 PixelSearch, Px, Py, 0, 0, 1680, 1050, 0x9d6346, 3, Fast 
 if !ErrorLevel 
   { 
   Send, {Lbutton Up} 
   Sleep, 1500 
   } 
 }
Is this coded correctly for the basic functionality of the script? I did a lot of reading and this is the best I could come up with at my level of AHK knowledge.

Thanks

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: rc76 and 216 guests