I want to make a bot that can play a game called Piano Tiles 2
But the problem is that when it gets too fast, the mouse miss the tile and touchs the border
I use the variable $DELAYED_TILE_ESTIMATE in my script
I use PixelSearch command to check if a tile is detected
If is detected a black pixel in the region of PixelSearch command,
I use MouseMove(*cords*) to move the mouse and
MouseClick to click the tile
I want to do a code after MouseMove that can "imagine" a line at the top of the mouse position and check how much pixels of that line are off the tile, after it checks for the position, move the mouse to a place where it can touch the tile and not the border.
Graphic explanation here:

$DELAYED_TILE_ESTIMATE is the variable that i want to assign to store the value that the imaginary red line calculated and add it to the Y coordinate
of MouseMove(*Cords*) command
Example: 50 pixels off the tile:
$_NEGATIVE_PIXELS is the amount of pixels of the red line that are off the tile
$DELAYED_TILE_ESTIMATE = $_NEGATIVE_PIXELS
then
MouseMove(*cord1*, *cord2 + $DELAYED_TILE_ESTIMATE*, *cord3*)
So after moving the mouse once, the red line will calculate, and move the mouse inside the tile so it wont miss it
Thanks a lot for reading :)






