dc740 / AutoHotPy

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

WindowsError: [Error 126] The specified module could not be found. #2

Closed darenx closed 5 years ago

darenx commented 5 years ago

Hello I'm getting this error when I try to run Example-GameCombo.py and others Examples. Traceback (most recent call last): File "C:\Python\AutoHotPy-master\Example1-GameCombo.py", line 51, in auto.start() #Now that everything is registered we should start runnin the program File "C:\Python\AutoHotPy-master\AutoHotPy.py", line 546, in start self.interception = InterceptionWrapper() File "C:\Python\AutoHotPy-master\InterceptionWrapper.py", line 171, in init self.interceptionDll = ctypes.WinDLL ("./interception.dll") File "C:\Python27\lib\ctypesinit.py", line 362, in init self._handle = _dlopen(self._name, mode) WindowsError: [Error 126] The specified module could not be found.

dc740 commented 5 years ago

Hi, did you check that interception.dll is present in the same folder as the script? The logs are basically saying it can't find the dll file.

darenx commented 5 years ago

Thanks for replying, Yes it is in the same folder. imagen

dc740 commented 5 years ago

OKs. Let's continue in spanish.

Podrías verificar por que el archivo tiene un icono del bloc de notas? Qué pasa con la arquitectura? La arquitectura es la correcta? (x86/x64) Hace unos cuantos años que no uso Windows, por lo que hace bastante tiempo que no pruebo este proyecto. En teoría deberías poder cargarlo sin problemas. Fijate si podés crear un script de python común que lo abra con ctypes.WinDLL(). Esa va a ser la prueba que nos diga que es lo que está pasando, si es un problema con el archivo o quizás ctypes cambió en las nuevas versiones y la carga se hace diferente.

Gracias por el reporte!

darenx commented 5 years ago

Hola lo que hice fue lo siguiente: Borre una carpeta del registro para para que no aparezca abrir por default los archivos .dll, al parece en algun momento intente abrir un archivo con notepad(Vale la pena destacar que soy bastante novato en todo esto). luego segun vi en un foro accedian al .dll poniendo la ruta en donde esta el archivo .dll En InterceptionWrapper.py", line 171, cambie "self.interceptionDll = ctypes.WinDLL ("./interception.dll")" por "self.interceptionDll = ctypes.WinDLL ("C:\Users\Cesar\Desktop\Python\AutoHotPy-master\interception.dll")"

y bueno al parecer funcionó ejecuto Example1-GameCombo y segundo lo que dice el script si apreto A escribe : A -> S -> move left -> move up -> A -> S y con scape sale.

as as

imagen Asi que bueno al parecer funciona. Gracias por tu tiempo.

darenx commented 5 years ago

Ya probé otro ejemplos y funcionan a la perfección :)