The Unofficial Known Issues and Gotchas List

Helpful script writing tricks and HowTo's
User avatar
LazyMan
Posts: 26
Joined: 14 Jan 2014, 00:22
Location: peering out from behind my favorite rock

The Unofficial Known Issues and Gotchas List

10 Feb 2014, 13:14

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. :mrgreen:)
Last edited by LazyMan on 10 Feb 2014, 22:03, edited 1 time in total.
vasili111
Posts: 747
Joined: 21 Jan 2014, 02:04
Location: Georgia

Re: The Unofficial Known Issues List

10 Feb 2014, 15:51

Good idea. But I think it is better to place that thread in "Bug Reports" section of the forum.
DRAKON-AutoHotkey: Visual programming for AutoHotkey.
User avatar
LazyMan
Posts: 26
Joined: 14 Jan 2014, 00:22
Location: peering out from behind my favorite rock

Re: The Unofficial Known Issues List

10 Feb 2014, 16:30

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. :)
User avatar
tank
Posts: 2417
Joined: 28 Sep 2013, 22:15
Facebook: charlie.simmons.7334
Google: ttnnkkrr
GitHub: ttnnkkrr
Location: Louisville KY
Contact:

Re: The Unofficial Known Issues List

10 Feb 2014, 17:32

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.
We are troubled on every side‚ yet not distressed; we are perplexed‚
but not in despair; Persecuted‚ but not forsaken; cast down‚ but not destroyed;
https://www.facebook.com/ahkscript.org
If you have forum suggestions please submit a pull request
kon
Posts: 1756
Joined: 29 Sep 2013, 17:11

Re: The Unofficial Known Issues List

10 Feb 2014, 18:49

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.
User avatar
joedf
Posts: 6693
Joined: 29 Sep 2013, 17:08
Facebook: J0EDF
Google: +joedf
GitHub: joedf
Location: Canada, Quebec
Contact:

Re: The Unofficial Known Issues and Gotchas List

12 May 2014, 20:24

+1 Kon
Image Image Image Image Image
Windows 10 x64 Professional, Intel i5-8500 @ 3.00 GHz, 16GB DDR4 3200 MHz, NVIDIA GTX 1060 6GB | [About Me] | [ASPDM - StdLib Distribution]
[Populate the AHK MiniCity!] | [Qonsole - Quake-like console emulator] | [LibCon - Autohotkey Console Library] | [About the AHK Foundation]
MindCaged
Posts: 17
Joined: 19 Jun 2014, 12:33

Re: The Unofficial Known Issues and Gotchas List

18 Jul 2014, 16:09

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.
lexikos
Posts: 6207
Joined: 30 Sep 2013, 04:07
GitHub: Lexikos

Re: The Unofficial Known Issues and Gotchas List

04 Sep 2014, 02:05

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.
MindCaged
Posts: 17
Joined: 19 Jun 2014, 12:33

Re: The Unofficial Known Issues and Gotchas List

04 Sep 2014, 07:26

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.
User avatar
joedf
Posts: 6693
Joined: 29 Sep 2013, 17:08
Facebook: J0EDF
Google: +joedf
GitHub: joedf
Location: Canada, Quebec
Contact:

Re: The Unofficial Known Issues and Gotchas List

05 Sep 2014, 10:16

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. :P
Image Image Image Image Image
Windows 10 x64 Professional, Intel i5-8500 @ 3.00 GHz, 16GB DDR4 3200 MHz, NVIDIA GTX 1060 6GB | [About Me] | [ASPDM - StdLib Distribution]
[Populate the AHK MiniCity!] | [Qonsole - Quake-like console emulator] | [LibCon - Autohotkey Console Library] | [About the AHK Foundation]

Return to “Tutorials”

Who is online

Users browsing this forum: JnLlnd, SAbboushi and 4 guests