We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
key_state()
Something with key_state() broke between v1 and v2:
check = ahk.key_state("~")
This was working fine in v1.
In v2, I got an invalid index error. The code didn't change between v1 -> v2, I only upgraded the ahk + ahk (python, v1.5.3) libraries.
invalid index
2.0.12
v2
from ahk import AHK ahk = AHK() check = ahk.key_state("~")
Traceback (most recent call last): File "C:\test\ahk\testpy", line 4, in <module> check = ahk.key_state("~") File "C:\test\ahk\env\lib\site-packages\ahk\_sync\engine.py", line 1092, in key_state resp = self._transport.function_call('AHKKeyState', args, blocking=blocking) File "C:\test\ahk\env\lib\site-packages\ahk\_sync\transport.py", line 611, in function_call return self.send(request, engine=engine) File "C:\test\ahk\env\lib\site-packages\ahk\_sync\transport.py", line 832, in send return response.unpack() # type: ignore File "C:\test\ahk\env\lib\site-packages\ahk\message.py", line 221, in unpack raise self._exception_type(s) ahk.message.AHKExecutionException: Error occurred in Array.Prototype.__Item.Get (line 1671). The error message was: Invalid index.. Specifically: 2
The text was updated successfully, but these errors were encountered:
Thanks. Confirmed the bug and reproduced. When the mode argument is not given, this bug appears when using AHK v2.
mode
I should have a fix out for this today.
Sorry, something went wrong.
Merge pull request #279 from spyoungtech/gh-277
0cd1454
fix key_state for AHKv2 when no mode argument is given
The fix for this is now released in version 1.5.4
Successfully merging a pull request may close this issue.
describe your issue
Something with
key_state()
broke between v1 and v2:This was working fine in v1.
In v2, I got an
invalid index
error. The code didn't change between v1 -> v2, I only upgraded the ahk + ahk (python, v1.5.3) libraries.ahk.version
2.0.12
AutoHotkey version
v2
Code to reproduce the issue
Traceback/Error message
The text was updated successfully, but these errors were encountered: