Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
pyahk autohotkey dll
#1
hey everybody,

I'm new to trying to write ahk in python and I'm trying to build my first script using autohotkey dll and the ahk module. When i try to load the script into autohotkey I get the above error. Here is the code:

ahk = cdll.AutoHotkey
keyboard = ahk
parser = ahk

------> ahk.key_press(ahk.key_press(^+c, print, ahk.key_press(f, {enter}))

ahk.key_press(^+z, print, ahk.key_pres(u, {enter}))

ahk.key_press(ahk.key_press(^+x, print, ahk.key_press(m, {enter}))

cmp_func = CMPFUNC(py_cmp_func)
fx = create_string_buffer(str(cast(cmp_func, c_void_p).value))

ahk.ahkdll(pyclient, "", fx)
ahk.ahkassign(create_string_buffer("fx"), fx)
ahk.addScript(script)
ahk.ahkFunction(create_string_buffer("fx2"), create_string_buffer("Untitled"))

I've fixed the errors and it doesn't throw an error but it won't launch in either python terminal or autohotkey. What am I missing? Thanks for your help.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Question convert autohotkey script to python / macro - press key when pixel get colour willson94d 1 3,573 Jan-01-2022, 08:13 PM
Last Post: Yoriz
  pyahk not working Zenot1c 3 3,364 Feb-18-2020, 10:38 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020