dc740 / AutoHotPy

AutoHotKey replacement using Incerception driver
GNU Lesser General Public License v3.0
59 stars 23 forks source link

Please, help. <class 'OverflowError'>: int too long to convert #3

Closed xx1raven1xx closed 5 years ago

xx1raven1xx commented 5 years ago

When I run scripts, I get similar errors:

Traceback (most recent call last): File "C:\Users\Alex\AppData\Local\Programs\Python\Python37\Tools\scripts\Example1-GameCombo.py", line 51, in auto.start() #Now that everything is registered we should start runnin the program File "C:\Users\Alex\AppData\Local\Programs\Python\Python37\Tools\scripts\AutoHotPy.py", line 554, in start self.interception.interception_set_filter(self.context, self.interception.interception_is_keyboard, InterceptionFilterKeyState.INTERCEPTION_FILTER_KEY_ALL); File "C:\Users\Alex\AppData\Local\Programs\Python\Python37\Tools\scripts\InterceptionWrapper.py", line 210, in interception_set_filter return self.interceptionDll.interception_set_filter(context, predicate, filter1) ctypes.ArgumentError: argument 1: <class 'OverflowError'>: int too long to convert

What am I doing wrong?

dc740 commented 5 years ago

Hello Alex. I don't have a Windows machine to test this, but it looks like the interception dll changed the definition of one of their functions, so our ctypes calls are outdated. You need to re-generate the interception_set_filter (line 210) definition manually to match the new dll. Download the Interception API from the official site and check that the C definition it's probably different and causing issues now. I'm not having any free time for this project right now, and it looks like it could take me a couple of months to get a windows machine, and the time to test it and fix it. Can you send a PR if you manage to make it work? Thanks

dc740 commented 5 years ago

@xx1raven1xx can you confirm that it works on this branch? @FedyuninV seems to have fixed it, and since I don't have time to test it, I'd like a confirmation before merging it. Thank you

https://github.com/FedyuninV/AutoHotPy

xx1raven1xx commented 5 years ago

@dc740 YES!!! Now it all worked. All examples work. Thank you very much!

I also tested on Win10 64-bit Python 3.7 (with minor fixes like Queue -> queue). (tnx FedyuninV)