I first used it to automate grinding gold and items in a simple flash-based RPG for me and my younger siblings around ~2005. At first it just clicked certain locations that buttons would be on a fixed schedule to advance a quest to the end and repeat. But then, being a flash game after all, sometimes it would take a second to load the next screen which throws off the timings and breaks the sequence. So I changed it to wait for pixels to change color as an indication that something finished loading and to start the next sequence of clicks. But that didn't end up being very reliable because the colors & locations weren't always exactly the same, so I updated it to take a screenshot and use it to find the average color of an area of the game where a button would be which ended up being a much more reliable timing indicator. But then it was very slow/used a lot of CPU (and I needed all that CPU to go to running the flash game in a 2005 browser on a 2002 dell), and using a scripting language to sum up 100k pixels every frame just wasn't fast enough. So I wrote a single C function to do the color averaging on a byte buffer, copied the raw compiled machine code (as hex) into AutoHotkey and directly called it with DllCall to get the summed result: ah, much faster. But there was still an unreliable aspect where the position of the game in the browser window and the location of the browser window was fiddly to configure, and my siblings had a hard time getting it set up. It turns out IE used standard windows controls in the browser which (if you look in the right place) exposed the location of the flash bounding box, and with some calculations relative to the browser window I made all the click locations relative to the flash window, which solved that problem. It think it also supported browser scaling because we liked to play it at higher than 100% zoom.
I ended up being more interested in the programming than the game, and my first published project was an array library to make working with associative arrays (where each element is a separate variable myarray1, myarray2, myarray3 etc) easier with insert/delete/append etc operations, before AutoHotkey added true arrays and objects.
Then I went to university for chemistry for 2 years before getting my wits about me and realizing that I would probably be more interested in CS.