Color Macro

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
srklie
Posts: 1
Joined: 22 Jun 2021, 18:16

Color Macro

22 Jun 2021, 18:25

Code: Select all

#include <Misc.au3>

HotKeySet("{e}", SendKey)

While 1
     Sleep(1000)
WEnd

Func Sendkey()
    If PixelGetColor(581, 956) = 0x626262 Then
        Send(1)
	 EndIf

    HotKeySet("e", "Nothing")
    MouseDown("left")
    Do
        Sleep(10)
    Until Not _IsPressed("45")
    MouseUp("left")
    HotKeySet("e", "Sendkey")
EndFunc
I am desperately trying to do a script where if the location inputted detects the color I also Inputted it will send a key and then left click.
Been trying for 4 days lol Im stupid:(
gregster
Posts: 9001
Joined: 30 Sep 2013, 06:48

Re: Color Macro

22 Jun 2021, 18:34

Welocme, but I guess you are in the wrong forum. These are the AutoHotkey forums, but you posted an AutoIt script.
(These two scripting languages parted ways many years ago and are not compatible nowadays.)
We could help you with AHK code, though...

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Anput, doodles333, Nerafius, ShatterCoder and 83 guests