Page 1 of 1
The Unofficial Known Issues and Gotchas List
Posted: 10 Feb 2014, 13:14
by LazyMan
This is a list of known issues and gotchas with AutoHotkey. The known issues are limited to issues that have been previously discussed and adjudicated by
Lexikos on an AutoHotkey forum; each list item is a link to the thread or post regarding the issue. The gotchas list will be a catch-all of others things. Please add other known issues--with their corresponding links--and/or gotchas to this thread to be collected into this top-post list. Thanks for your contributions!
Known Issues
Gotchas
(
Be careful what you ask for because you just might be asked to give it. )
Re: The Unofficial Known Issues List
Posted: 10 Feb 2014, 15:51
by vasili111
Good idea. But I think it is better to place that thread in "Bug Reports" section of the forum.
Re: The Unofficial Known Issues List
Posted: 10 Feb 2014, 16:30
by LazyMan
vasili111 wrote:But I think it is better to place that thread in "Bug Reports" section of the forum.
I understand your perspective; I think most items in the list will link to there. And I understand
tank's suggestion to have it in Tutorials since it's a reference list. As long as it grows and fulfills its potential, I'll be happy to refer to it wherever it's located.
Re: The Unofficial Known Issues List
Posted: 10 Feb 2014, 17:32
by tank
these wouldn't really count as bugs. these are more known gotchas. because there are some flexibilities for instance. things like hotkeys and games. or why AHK compiled scripts may falsely show positive in some Virus scanners. things like when looping thru com objects collections to use a_index-1 because of the concept of 0 based indexes. when to use urldownloadtofile instead of more sophisticated browser automation. There are so many things that arent bugs that people get hung up on time and again. So i suggested tutorial because maybe just maybe such a thread mught be noticed by some poor lost soul not understanding why some documentation that uses the word array means a numbered variable set var%1% and others refer to an array but in terms of associative or an object. because of the evolution of things many of us that have been involved a while just take this knowledge for granted
example
http://ahkscript.org/docs/commands/StringSplit.htm vs
http://ahkscript.org/docs/commands/Sort.htm
Yes it seems to be adequately documented but the word
array means something very different in each use.
Re: The Unofficial Known Issues List
Posted: 10 Feb 2014, 18:49
by kon
One issue that I've seen a lot are questions like, "
Why can't I remap one joystick button to another joystick button?" Or "Why can't I
Send a joystick button?"
It's documented, but is often overlooked. It probably doesn't help that there is an entire page in the docs called "Remapping a Joystick to Keyboard or Mouse." The "to Keyboard or Mouse" portion is frequently missed.
Edit: I'm not sure if this qualifies for the list (maybe it's just a faq). I'll leave that up to others.
Re: The Unofficial Known Issues and Gotchas List
Posted: 12 May 2014, 20:24
by joedf
+1 Kon
Re: The Unofficial Known Issues and Gotchas List
Posted: 18 Jul 2014, 16:09
by MindCaged
There's also a few other things that are limitations of either the operating system or autohotkey.
- Unable to detect power, sleep, wakeup keys in almost all instances(Believe me I've tried.) I think this is because with USB keyboards at least it doesn't send a keystroke but a Usage ID that seems to be swallowed at a low level by the OS and is pretty much inaccessible which is /really/ annoying since I'd pay good money if I could just code it so that I have to hold shift or something to trigger them instead of having to disable them completely including on the case.
- Likewise unable to detect Fn keys(although sometimes if the Fn-combination triggers another key like perhaps a multimedia key you can pick that up.) Since Fn is not actually a key to the system, it doesn't send any code when pressed, it only modifies the scan codes and such that the other keys send, it's basically a hardware level modifier key.
- Can't really detect WheelLeft/WheelRight before Windows Vista, an OS limitation, although I thought I was onto something recently but it's beyond my ability. I have an Engage Optical Mouse I got from OfficeMax and it comes with software that detects those events and emulates the horizontal scrolling in Windows XP, I think there's a custom driver/filter involved, but there's no way for Autohotkey to detect it, or at least none I'm aware of.
- Something I found: Multimedia keys like the Play/Pause key and such: GetKeyState() can only get the logical state, the "P" option doesn't work, if I remember correctly. Not sure if that's a bug or just a limitation. Also, I tried to make #Volume_Mute:: and it made the start menu popup, so I had to add a Send {Ctrl} or something.
- Something I just found the other day and made a little post about. Ctrl+ScrollLock = CtrlBreak, if you check wikipedia it's due to a relatively ancient and antiquated standard from like the very first keyboards that didn't have a separate pause/break key.
- Some keys will conflict with other keys. For example Windows keys and LCtrl. This is also true for various other keys if I recall correctly like I think some multimedia keys. And CapsLock I think conflicts with some modifiers... I think, it's been a while since I checked.
There might be others, but they're not coming to mind at the moment. If you can't tell I've been messing with Autohotkey for a few years now, I think it might be one of my favorite programs since it gives me so much control and has a lot of versatility.
Re: The Unofficial Known Issues and Gotchas List
Posted: 04 Sep 2014, 02:05
by lexikos
WheelLeft/Right is documented to "have no effect on operating systems older than Windows Vista" or similar, in multiple places. The horizontal scrolling messages etc. just didn't exist before Vista. However, SetPoint can detect horizontal scroll on Logitech mice, presumably because it reads input at a lower level
GetKeyState can detect the physical state of multimedia keys, if the physical state is ever changed. However, USB keyboards tend to send "artificial" events for those keys, for some reason. The same keyboard connected via PS2 can produce different results.
It's true that keyboards have hardware limitations. However, LWin and LCtrl (or any other modifier key) do not conflict on any keyboard I've ever owned. Conflicting modifier keys would be a sign of a very poorly designed keyboard.
Re: The Unofficial Known Issues and Gotchas List
Posted: 04 Sep 2014, 07:26
by MindCaged
Hmm, I think I just tried the ctrl+Win thing on my newer keyboard and it seemed to work by the key log(didn't make a hotkey to test). I think I last tried it on a much older keyboard, so that was probably the problem.
Re: The Unofficial Known Issues and Gotchas List
Posted: 05 Sep 2014, 10:16
by joedf
Taking advantage of script preprocessing, there are a few neat tricks, here are just a few that I have on mind right now:
- Probably more known now due a more or less recent mention by Lexikos: auto execute a function()
- accessing global variables without keyword 'Global'
I'm sorry I didn't provide any code examples, not practical on a mobile phone.
Re: The Unofficial Known Issues and Gotchas List
Posted: 03 Dec 2014, 20:53
by tripshack