Hello guys, i tried to do a simple script for this minigame.
When the blue line will cover the grey "E" just to simple execute E. The problem is it doesn't work and i don't understand if it's about the area range or ... ?
Set CoordMode for how you intend to use it by default its window and not screen.
If the E changes color then check when its not equal ( != ) to gray and send E etc.
(this may help when the color covering the E are not a consistent color of blue)
Set CoordMode for how you intend to use it by default its window and not screen.
If the E changes color then check when its not equal ( != ) to gray and send E etc.
(this may help when the color covering the E are not a consistent color of blue)
It's not changing color when it's overlay. I will stay in a position with a black background to see the perfect gray.
@mikeyww i'm searching for grey, because the blue bar it's a moving line. And I will position the camera, to have a black background to see the perfect gray.
Now with your script, I was able to get the color that interested me and it stabilized the best (3B3B3B when it's in a black background).
At 0:03, after i activated your script, the "mouse"(screen) went down aggressively (anyway that's not a problem). Now i need just to press pe E key when the blue line it's in the grey area cuz, the gray space it's not a stable location. Thanks !
Last edited by Giani123 on 04 Jan 2021, 17:06, edited 1 time in total.
I also tried this script but without success. The coordinates look for my gray box only in a certain position, even if it does not always appear in the same place. Even if we say that it happens to fall in the fixed coordinates, it still doesn't do anything. (Press E)
Thanks for the reply.
1. The mouse it's moving to correct location.
2. Color is the same, i already tested again and it's still. 3B3B3B
Hmm with PixelSearch can i get an example for the above question? Thanks
Yeah, i tried with PixelSearch, i already found the color when the blue will cover the grey area. I used that example to debug and see if it's okay and when the colors will overlay, and i got succed.
Now I need to execute my E key when it first finds the color. Need some help there Thanks
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
#SingleInstance, Force
SetKeyDelay, 50,50
#IfWinActive ahk_class grcWindow ; Disables hotkeys when alt-tabbed or GTA is closed.
g::
PixelSearch, Px, Py, 790, 885, 1080, 920, 0x49423A, 3, Fast
if (ErrorLevel=0)
{
Send E
}
1. While you are testing, you can use MsgBox instead of Send. Add one to see if the "g" triggers, and a second one to see if your color is found. If not found when expected, then you can see what the actual pixel value is.
2. How did you determine the coordinates? Issue a MouseMove to the same coordinates (e.g., top left), to double-check.
t::
x := 1003, y := 930
MouseMove, x, y
PixelGetColor, color, x, y
MsgBox, 64, Color, Color at (%x%,%y%) is %color%
I tried multiple times changing x and y until I finally saw that they were ok. I checked with MouseMove and it's okay (also Top Left and Bot.Right)
I also set the color with the script above, changing x and y until I realized that when I catch the color it is always the same.
1. This is a problem, i don't understand how to do a msgbox to see if "g" triggers?!
And the second one i already did with the example where it's says :
It's not working yet... I'm not into programming, i'm trying my best
I set the coordinates ok, the color it's okay, but the script itself it does not do what he should. I press G to start the script and he never press E when he detect the color
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
#SingleInstance, Force
SetKeyDelay, 50,50
#IfWinActive ahk_class grcWindow ; Disables hotkeys when alt-tabbed or GTA is closed.
g::
PixelSearch, Px, Py, 790, 885, 1080, 920, 0x49423A, 3, Fast
if ErrorLevel
Send E
Return