If you run a script first with an older version of autohotkey and then a newer version, #SingleInstance doesn't work.
I use a basic .exe in the startup folder to run a script in the documents folder and recently reinstalled windows without losing files. Thus there was an old version of ahk v2 (2.0-a123-e5801ee8) in the startup folder but v2.0-beta.3 in the autohotkey folder.
I feel like this should be a bug. It was at least pretty confusing.
AHK v2.0-beta.3 #SingleIntance not working if running two different versions of the .exe Topic is solved
-
- Posts: 7
- Joined: 18 Jun 2020, 17:16
Re: AHK v2.0-beta.3 #SingleIntance not working if running two different versions of the .exe Topic is solved
there is no bug.
The doc for #singleinstance, https://www.autohotkey.com/docs/commands/_SingleInstance.htm , states
The doc for #singleinstance, https://www.autohotkey.com/docs/commands/_SingleInstance.htm , states
The main window's title--well, maybe you can't see it if you open it and have stupid windows 10 which has no window titles--is, essentially the file's path with "- AutoHokey" and the version number appended. So, for two scripts to be "identical" they must have the same PATH, and be of the same AHK version.AutoHotkey relies on the title of the script's main window to identify other running instances of the script.