[HELP] how to capture this ?

Ask gaming related questions (AHK v1.1 and older)
3600
Posts: 16
Joined: 20 May 2017, 11:42

[HELP] how to capture this ?

21 May 2017, 08:54

Image

I started to work on this script but no idea how to make it when the bobber(image) move to trigger ...any action.

how can i record/capture it that when its move, to trigger LMB and HOLD it.

as you can see i tried with pixel color but its very buggy and not detected always...should i do ImageSearch ?

Thank you all in advance


Code: Select all

Click, 960, 540 Left, Down
Sleep, 1000
Click, 960, 540 Left, Up
Loop
{
    CoordMode, Pixel, Screen
    PixelSearch, 0, 0, 1682, 269, 1874, 385, 0x974142, 30, RGB
    If ErrorLevel
    	Break
}
Until ErrorLevel = 0
If ErrorLevel = 0
{
    Click, 960, 540 Right, Down
    Sleep, 10
    Click, 960, 540 Right, Up
}
Last edited by 3600 on 24 May 2017, 11:34, edited 3 times in total.
neomulemi6
Posts: 216
Joined: 30 Jun 2016, 06:01

Re: [HELP] how to capture this ?

21 May 2017, 21:31

Your image isn't working. No idea what you're trying to do.
3600
Posts: 16
Joined: 20 May 2017, 11:42

Re: [HELP] how to capture this ?

24 May 2017, 08:15

fixed thank you
User avatar
evilC
Posts: 4823
Joined: 27 Feb 2014, 12:30

Re: [HELP] how to capture this ?

24 May 2017, 13:53

Use the fast param in your PixelSearch, eg PixelSearch, 0, 0, 1682, 269, 1874, 385, 0x974142, 30, RGB Fast
The default mode searches in columns, whereas fast searches in rows, plus it is faster.
Seeing as you want to find the top-most pixel of a given color, you want fast.

You are also not retrieving the found coordinates from PixelSearch. The first two parameters are outputs, not inputs.

Code: Select all

PixelSearch, x, y, 1682, 269, 1874, 385, 0x974142, 30, RGB Fast
msgbox % "The pixel was found at x " x ", y " y
There is probably also zero point in searching anything more than a 1 pixel wide column. That may mean that fast making it search by rows is moot, but it will still be quicker.
3600
Posts: 16
Joined: 20 May 2017, 11:42

Re: [HELP] how to capture this ?

25 May 2017, 09:56

still buggy i think its the transparent , every time you move in game the background behind change and its change the pixel color.

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: No registered users and 27 guests