Would help if you actually post the relevant parts of the AHK script. You may also want to try searching for AHK and movement, there are numerous posts on how to handle movement correctly with AHK.