I am a casual user of Autohotkey, I use it, it helps me a lot, but am not a codie.
When I started using AHK v1 years ago, I found somewhere an info, that it is recommended to star my .ahk script with following code:
Code: Select all
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
#Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
Thanks!