first of all this is the small script
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
if not A_IsAdmin
{
Run *RunAs "%A_ScriptFullPath%"
ExitApp
}
loop
{
CoordMode, Pixel, Window
PixelSearch, FoundX, FoundY, 78, 999, 104, 1019, 0x3FDE45, 3, Fast RGB
If ErrorLevel = 0
{
CoordMode, Pixel, Window
PixelSearch, FoundX, FoundY, 323, 1001, 337, 1012, 0x3FDE45, 1, Fast RGB
If ErrorLevel
{
SoundBeep
send, h
send, {h}
sendinput, h
sendinput, {h}
sleep, 400
}
}
sleep, 150
}
return
xbutton2::6
basically it searches for pixel if not found , it will play a sound and press H key but it doesnt work at all
script already run in admin, the pixelsearch is working because the beep sound is working too but only the send function doesnt work
could anyone please help me make it work on a game i play please? the game is a directx, run in fullscreen but even windowmode still doesnt work too.
So basically pixelsearch works perfectly, it beeps the sound if the pixel is not found BUT cannot send any keys at all.
all types of send doesnt work on a game Topic is solved
Re: all types of send doesnt work on a game Topic is solved
Hallo,
a few things you can still try: How to Make AHK Work in Most Games - The Basics
a few things you can still try: How to Make AHK Work in Most Games - The Basics
Re: all types of send doesnt work on a game
thank you botherRohwedder wrote: ↑28 Nov 2022, 03:52Hallo,
a few things you can still try: How to Make AHK Work in Most Games - The Basics
the holds key down for 20ms perfectly works now