Closed kitsu closed 3 years ago
ahkgetvar returns always a pointer to a string similar to ahkFunction. ahk.ahkgetvar("test", 1) is only required for LowLevel functions like Alias().
from ctypes import * ahk = cdll.AutoHotKey ahk.ahktextdll("","","") ahk.ahkassign("test","5") print str(cast(ahk.ahkgetvar("test", 0), c_char_p).value)
Hello HotKeyIt, Seems like print str(cast(ahk.ahkgetvar("test", 0), c_char_p).value) throwing an error. Can you share me the working code for new version. Python version 3.7 AutoHotkey.dll version 1.1.09.01
Are you using ANSI? Otherwise you will need c_wchar_p. Also what error do you get?
From Python I try:
I expect ahkgetvar to return the value not a pointer, am I wrong? Using Version 1.1.8.1 AutoHotkey_H ANSI 32-bit (on winXP64, Python2.7 32bit).
Thanks a ton for building this though, it's very helpful!