spyoungtech / ahk

Python wrapper for AutoHotkey with full type support. Harness the automation power of AutoHotkey with the beauty of Python.
MIT License
887 stars 66 forks source link

ahk.image_search(color_variation=n) raises exception #199

Closed deshudiosh closed 1 year ago

deshudiosh commented 1 year ago

It seams that using color_variation propery in image search causes error: ahk.message.AHKExecutionException: Error occurred in ImageSearch. The error message was: 2

This is erroring code:

from ahk import AHK

ahk = AHK(executable_path='./AutoHotkey_1.1.36.02/AutoHotkeyU64.exe')

x = ahk.image_search("./icon.jpg", color_variation=50)
print(x)

Without color_variation it runs smoothly (although icon is not found on the screen)

spyoungtech commented 1 year ago

Thanks. This bug appears to be present any time an option of any kind is provided.

I'll have a fix out for this shortly.

spyoungtech commented 1 year ago

This is now fixed and released in v1.1.2 🎉

deshudiosh commented 1 year ago

This is amazing quality of support. Thank you. I can confirm that it indeed solved my issue.