Image search and key press when image appear

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
metherliince
Posts: 2
Joined: 16 Feb 2019, 23:34

Image search and key press when image appear

16 Feb 2019, 23:45

I've been trying to figure out how to make a script which involves AHK, finding the image and pressing a key for when the image appears. Basically, Four letters appear, A, Q, S, W.
f2::
Loop, 900000
{
ImageSearch, FoundX, FoundY, 931,719, 830, 664, C:\\Users\-\Desktop\HWFP\qqq.png
if ErrorLevel = 0
Send Input q
SetKeyDelay [, 70, 0, play]
if Error level = 1



f3::pause

}
Is what i have so far. What i want is for f2 to start said script, then for it to search for the picture, qqq.png ( picture of Q ) and press q every 70 miliseconds, and stop once qqq.png is gone
I have multiple of these scripts, all for each letter, because i couldn't figure out how to make them into one script.
I tried starting the script but nothing happened. Any help is appreciated, this is my first day using AHK

f3::pause

}
Is what i have so far. What i want is for f2 to start said script, then for it to search for the picture, qqq.png ( picture of Q ) and press q every 70 miliseconds, and stop once qqq.png is gone
I have multiple of these scripts, all for each letter, because i couldn't figure out how to make them into one script.
I tried starting the script but nothing happened. Any help is appreciated, this is my first day using AHK

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: inseption86, mikeyww and 405 guests