I'm finding some inconsistencies with the AlwaysOnTop function in AutoHotKey. Take the following script for example:
#+a::
{
WinSet , AlwaysOnTop , , A
return
}
#+b::
{
WinSet , AlwaysOnTop , Toggle
return
}
The first option is based on a script I have been using for years that was cobbled together from other sources. That version works to toggle the AlwaysOnTop setting on whatever is the currently active window.
The second option is how the current documentation says it should be done. This does nothing when I try to trigger the AlwaysOnTop setting.
It's not just that the documentation is wrong (at least not completely), because that syntax seems to work for another script that I just wrote. In this new script, I always want it to only activate the AlwaysOnTop mode, never toggle, so I'm using WinSet , AlwaysOnTop , On
and it's working fine.
Leaving the on/off/toggle value out doesn't work either (though it should default to toggle), and neither does using -1 (a new option in the latest version of AHK). It's not throwing any errors to run this, but if I play with the commas then it does say it encountered a syntax error.
Any ideas why the documented syntax doesn't work? Is it an actual glitch in AHK, or am I just misunderstanding its use in this case? I don't even know why my original version works, since I can't find that syntax documented anywhere.