Skip to content
New issue

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

Error when calling ahk.show_tooltip() #361

Open
stvncao5 opened this issue Dec 25, 2024 · 0 comments
Open

Error when calling ahk.show_tooltip() #361

stvncao5 opened this issue Dec 25, 2024 · 0 comments

Comments

@stvncao5
Copy link

describe your issue

I have copied the 'ahk.show_tooltip()' function from the official documentation, but it throws an error instead. While I vaguely understand the error (because I regularly use the fourth argument for the ToolTip AHK function and am only recently transitioning my AHK scripts to Python), I am not sure how to correct it.

I am running this with the ahk[binary] package installed.

ahk.version

1.8.2

AutoHotkey version

v2

Code to reproduce the issue

from ahk import AHK

ahk = AHK(version='v2')

ahk.show_tooltip("hello4", x=10, y=10)
#ahk.show_tooltip("hello4", x=10, y=10, 15) # I have also tried this

Traceback/Error message

Traceback (most recent call last):
File "C:\py_scripts\test.py", line 5, in
ahk.show_tooltip("hello4", x=10, y=10)
File "C:\Users\SC\AppData\Local\Programs\Python\Python39\lib\site-packages\ahk_sync\engine.py", line 1595, in show_tooltip
self._transport.function_call('AHKShowToolTip', args)
File "C:\Users\SC\AppData\Local\Programs\Python\Python39\lib\site-packages\ahk_sync\transport.py", line 532, in function_call
return self.send(request, engine=engine)
File "C:\Users\SC\AppData\Local\Programs\Python\Python39\lib\site-packages\ahk_sync\transport.py", line 745, in send
return response.unpack() # type: ignore
File "C:\Users\SC\AppData\Local\Programs\Python\Python39\lib\site-packages\ahk\message.py", line 216, in unpack
raise self._exception_type(s)
ahk.exceptions.AHKExecutionException: Error occurred in Array.Prototype.__Item.Get (line 2509). The error message was: Invalid index.. Specifically: 4
Stack:
C:\Users\SC\AppData\Local\Temp\python-ahk-pdjs_hen.ahk (2509) : [Array.Prototype.__Item.Get] which := args[4]

C:\Users\SC\AppData\Local\Temp\python-ahk-pdjs_hen.ahk (2509) : [AHKShowToolTip] which := args[4]

C:\Users\SC\AppData\Local\Temp\python-ahk-pdjs_hen.ahk (2793) : [] pyresp := %func_name%(argsArray*)

Auto-execute

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant