all types of send doesnt work on a game Topic is solved

Ask gaming related questions (AHK v1.1 and older)
kentpachi
Posts: 152
Joined: 15 May 2016, 01:23

all types of send doesnt work on a game

Post by kentpachi » 28 Nov 2022, 03:29

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.

Rohwedder
Posts: 7647
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: all types of send doesnt work on a game  Topic is solved

Post by Rohwedder » 28 Nov 2022, 03:52

Hallo,
a few things you can still try: How to Make AHK Work in Most Games - The Basics

kentpachi
Posts: 152
Joined: 15 May 2016, 01:23

Re: all types of send doesnt work on a game

Post by kentpachi » 28 Nov 2022, 08:15

Rohwedder wrote:
28 Nov 2022, 03:52
Hallo,
a few things you can still try: How to Make AHK Work in Most Games - The Basics
thank you bother

the holds key down for 20ms perfectly works now

Post Reply

Return to “Gaming Help (v1)”