I play a webpage based game in which a picture is shown alongwith some jumbled alphabets below the image. The player is supposed to click on the alphabets in an orderly manner to form the name of the thing shown in the image. Instead of using the mouse to click the alphabets I want to use the keyboard. e.g If I press S key on keyboard the mouse should click on the S on the screen. I have tried macro recorder softwares with 'if image exists' and 'if then else' commands and also tried to make a python script with openCV. But couldn't find a way through any of those.
The simplest way to do this would be using AutoHotKey. A script can be written using the ImageSearch command and setting the alphabets on keyboard as hotkeys to activate different commands.