ImageProcessing on a random place qte
Posted: 12 Oct 2017, 17:24
So, 1st time poster been a lurker for the most part, but now I'm stuck in this particular issue, let me explain for you guys.
So in the game dead by daylight you have those, those are called "Skill Checks" where if you press space bar inside the white block you get a great skill check(rewarding you with more points).
So with all my reading from the forums and the docs I found ImageProcessing to be the function that I need and this is what I came up so far:
My logic here was pretty primitive, I took the tiny white part along with the red line (where indicates where is your cursor) and made the script look for that, but 9/10 fails to find a match and maybe it's because this skill check can occur at any time in any direction () and my "" it's not a good representative of a constant in skill check.
Now, I don't know how to proceed, do you guys have any ideas, insights on what to do next?
Thanks in Advance, also sorry for any mistakes this may have I'm not a native speaker.
Keep on scriptin'
So in the game dead by daylight you have those, those are called "Skill Checks" where if you press space bar inside the white block you get a great skill check(rewarding you with more points).
So with all my reading from the forums and the docs I found ImageProcessing to be the function that I need and this is what I came up so far:
Code: Select all
Loop
{
CoordMode Pixel
ImageSearch, FoundX, FoundY, 0, 0, A_ScreenWidth, A_ScreenHeight,*110, C:\Users\AHKFORUM\Pictures\tiny6.png
if ErrorLevel = 2
{
MsgBox Could not conduct the search.
break
}
else if ErrorLevel = 1
{
}
else {
MsgBox The icon was found at %FoundX%x%FoundY%. ; Here I'll swap with send space hotkey, for now it's just for testing purposes
break
}
}
My logic here was pretty primitive, I took the tiny white part along with the red line (where indicates where is your cursor) and made the script look for that, but 9/10 fails to find a match and maybe it's because this skill check can occur at any time in any direction () and my "" it's not a good representative of a constant in skill check.
Now, I don't know how to proceed, do you guys have any ideas, insights on what to do next?
Thanks in Advance, also sorry for any mistakes this may have I'm not a native speaker.
Keep on scriptin'