Hi,
I need some help with a script or if someone have one already and want to share it.
Activation / deactivation script - when this color appears on my screen the script presses F
https://gyazo.com/ee5720d153702e9f8fdd9a0f04a6d5ca
Then waits 5 secounds and presses Key 2
If this colour appears on the screen https://gyazo.com/7022d5de16085aad6618ba7c58a7c8a0
I want to to press Key 1, wait 2 secounds and then press key 2
Loops untill I deactivate it.
Does someone have something like this?
Gaming GTA
Gaming GTA
Last edited by BoBo on 14 Apr 2021, 06:38, edited 2 times in total.
Reason: Moved to Gaming section. Fixed broken links.
Reason: Moved to Gaming section. Fixed broken links.
Re: Gaming GTA
Code: Select all
F3::
SetTimer, Go, % (on := !on) ? 250 : "Off"
SoundBeep, 1000 + 500 * on
Return
Go:
CoordMode, Pixel
SoundBeep, 1700
search(0x16671D, "F", 5, 2), search(0x534EA5, 1, 2, 2)
Return
search(color, send1, seconds, send2) {
PixelSearch,,, 0, 0, A_ScreenWidth, A_ScreenHeight, %color%,, Fast
If ErrorLevel
Return
SoundBeep, 900
Send %send1%
Sleep, 1000 * seconds
Send %send2%
}
Re: Gaming GTA
@mikeyww, thank you so much for this, so I get the beeping sound but nothing else is happening from the script once the colors show ingame. In Full screen or in windowed mode, or is there something I need to implement myself?
Its for Browser FiveM GTA V
Its for Browser FiveM GTA V
Re: Gaming GTA
Does it work in Notepad, if you show the images alongside it while Notepad is active?
Re: Gaming GTA
Yes in notepad it works...I also run the script as administrator
Ive tested some basic scripts aswell just to try and figure out
And nothing happened with these two either.
Ive tested some basic scripts aswell just to try and figure out
Code: Select all
^m::
SendInput t/lock
Numpad2::
SendInput t/e{enter}
Re: Gaming GTA
You demonstrated that the script works, but your game does not seem to respond as you expect. You could examine tips for games. Remember that Send will always send to the active window.
https://autohotkey.com/board/topic/111737-how-to-make-ahk-work-in-most-games-the-basics/
https://autohotkey.com/board/topic/111737-how-to-make-ahk-work-in-most-games-the-basics/
Re: Gaming GTA
So bascially I got this to work
^m::
Send {t down} /e
So the Script you sent me which I really appriciated is it possible to change it with commands (When green is pixel) F down and F up - Key2 down and up ?
Same with when red color is detected Send Key1 down and up and key2 down and up ?
I dont see where to change that function in your script :S
Hope you could help
^m::
Send {t down} /e
So the Script you sent me which I really appriciated is it possible to change it with commands (When green is pixel) F down and F up - Key2 down and up ?
Same with when red color is detected Send Key1 down and up and key2 down and up ?
I dont see where to change that function in your script :S
Hope you could help
Re: Gaming GTA
An example is below, in case it helps.
The effect here is probably just a prolonged key press that could alternatively be accomplished with SetKeyDelay-- but either method is OK.
Code: Select all
search(color, send1, seconds, send2) {
PixelSearch,,, 0, 0, A_ScreenWidth, A_ScreenHeight, %color%,, Fast
If ErrorLevel
Return
SoundBeep, 900
Send {%send1% down}
Send {%send1% up}
Sleep, 1000 * seconds
Send {%send2% down}
Send {%send2% up}
}
Who is online
Users browsing this forum: imbelicalcord, NssOne and 63 guests