JoystickGremlin icon indicating copy to clipboard operation
JoystickGremlin copied to clipboard

Error on Start Up: Failed to execute script joystick_gremlin

Open RamblinEngineer opened this issue 4 years ago • 13 comments

Recently updated to Joystick Gremlin R13.3 and get the following error when I start up my computer.

"Failed to execute script joystick_gremlin"

If I close the error and open Joystick Gremlin again, the program will start without error but I have noticed that macros will not run unless the Joystick Gremlin window is focused. I have tried starting the program with admin permissions and the same behavior occurs.

I have tried uninstalling and reinstalling Joystick Gremlin and vJoy, but still have the same issue.

This is what my system.log looks like.

2021-01-04 21:48:46 DEBUG -------------------------------------------------------------------------------- 2021-01-04 21:48:46 DEBUG 2021-01-04 21:48 2021-01-04 21:48:46 DEBUG Starting Joystick Gremlin R13.3 2021-01-04 21:48:46 DEBUG -------------------------------------------------------------------------------- 2021-01-04 21:48:47 INFO Initializing joystick devices 2021-01-04 21:48:47 DEBUG 1 joysticks detected 2021-01-04 21:48:47 DEBUG Added: name=vJoy Device guid={8A77EDF0-39FF-11E9-8002-444553540000} 2021-01-04 21:48:47 DEBUG vJoy guid={8A77EDF0-39FF-11E9-8002-444553540000}: (0, 32, 0) 2021-01-04 21:48:47 DEBUG vjoy id 8: (0, 32, 0) - MATCH 2021-01-04 21:48:47 INFO Checking vJoy installation 2021-01-04 21:48:47 INFO Initializing plugins 2021-01-04 21:48:47 DEBUG Loaded: cycle-modes 2021-01-04 21:48:47 DEBUG Loaded: description 2021-01-04 21:48:47 DEBUG Loaded: macro 2021-01-04 21:48:47 DEBUG Loaded: map-to-keyboard 2021-01-04 21:48:47 DEBUG Loaded: map-to-mouse 2021-01-04 21:48:47 DEBUG Loaded: noop 2021-01-04 21:48:47 DEBUG Loaded: pause 2021-01-04 21:48:48 DEBUG Loaded: play-sound 2021-01-04 21:48:48 DEBUG Loaded: previous-mode 2021-01-04 21:48:48 DEBUG Loaded: remap 2021-01-04 21:48:48 DEBUG Loaded: response-curve 2021-01-04 21:48:48 DEBUG Loaded: resume 2021-01-04 21:48:48 DEBUG Loaded: split-axis 2021-01-04 21:48:48 DEBUG Loaded: switch-mode 2021-01-04 21:48:48 DEBUG Loaded: temporary-mode-switch 2021-01-04 21:48:48 DEBUG Loaded: text-to-speech 2021-01-04 21:48:48 DEBUG Loaded: toggle-pause 2021-01-04 21:48:48 DEBUG Loaded: basic 2021-01-04 21:48:48 DEBUG Loaded: chain 2021-01-04 21:48:48 DEBUG Loaded: double_tap 2021-01-04 21:48:48 DEBUG Loaded: hat_buttons 2021-01-04 21:48:48 DEBUG Loaded: smart_toggle 2021-01-04 21:48:48 DEBUG Loaded: tempo 2021-01-04 21:48:48 INFO Gremlin UI created 2021-01-04 21:48:48 INFO Gremlin UI launching 2021-01-04 21:48:57 INFO Initializing joystick devices 2021-01-04 21:48:57 DEBUG 2 joysticks detected 2021-01-04 21:48:57 DEBUG Added: name=vJoy Device guid={8A77EDF0-39FF-11E9-8002-444553540000} 2021-01-04 21:48:57 DEBUG Added: name=Controller (Xbox One For Windows) guid={7544D010-4DB7-11EB-8003-444553540000} 2021-01-04 21:48:57 DEBUG Removed: name=vJoy Device guid={8A77EDF0-39FF-11E9-8002-444553540000} 2021-01-04 21:48:57 DEBUG vJoy guid={8A77EDF0-39FF-11E9-8002-444553540000}: (0, 32, 0) 2021-01-04 21:48:57 DEBUG vjoy id 8: (0, 32, 0) - MATCH 2021-01-04 21:50:10 INFO Gremlin UI terminated

Any help would be greatly appreciated, thank you.

RamblinEngineer avatar Jan 05 '21 05:01 RamblinEngineer

Still have the start up error, but I think I narrowed down where the macro issue might be occurring. When I add a fresh vJoy device, the macro in Joystick Gremlin works as intended. The issue is now Steam cannot see the Xbox controller. I found I was able to fix this by going to device manager>finding the "HID compliant controller">update driver. This causes Xbox controller to now be recognized as XINPUT compatible HID device and recognizable by Steam. After updating the driver, the macros in Joystick Gremlin no longer work unless the Joystick Gremlin window is focused. I had tried wiping the config.json file and creating a new profile from scratch, but macros still will not work without window focus.

RamblinEngineer avatar Jan 05 '21 05:01 RamblinEngineer

The "failed to execute script" error happens before Gremlin ever is running and is caused by the tool used to turn the Python code into an executable. Sometimes the entire collection of tools and Windows seem to get angry at each other and throw that error.

The macro issue should not be related to this, as the error prevents Gremlin from running at all. I suspect that it's not just macros but any action not running without focus, though that's an issue with the input library and xbox devices at times not receiving any input when Gremlin doesn't have focus, see https://github.com/WhiteMagic/dill/issues/1.

WhiteMagic avatar Jan 07 '21 19:01 WhiteMagic

Thanks for the feedback. I'll leave this here in case others come across the same issue.

https://www.reddit.com/r/hotas/comments/krcr1y/joystick_gremlin_wont_start_macro_from_xbox/

RamblinEngineer avatar Jan 10 '21 22:01 RamblinEngineer

The "Failed to execute script" error seems to be due to the working directory when started from the registry. I'm not sure what that gets set to, but it doesn't seem to be the folder containing the exe. Here's a quick work-around using vbscript to change the directory and launch the exe to allow Joystick Gremlin to start with windows:

(Assuming Joystick Gremlin is installed to default location)

  1. Create the file C:\Program Files (x86)\H2ik\Joystick Gremlin\joystick_gremlin.vbs containing:
Set oShell = CreateObject ("Wscript.Shell") 
Dim strArgs
strArgs = "cmd /c cd ""C:\Program Files (x86)\H2ik\Joystick Gremlin\"" & joystick_gremlin.exe"
oShell.Run strArgs, 0, false

You'll need to change the path if installed to a different location.

  1. Enable the Start Joystick Gremlin with Windows option, then change the registry key Computer\HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\Joystick Gremlin from .exe to .vbs (ie change to C:\Program Files (x86)\H2ik\Joystick Gremlin\joystick_gremlin.vbs)

cfinch81 avatar Jan 15 '21 03:01 cfinch81

I'll try to poke around this thing when I get around to looking back at the autostart feature.

WhiteMagic avatar Jan 29 '21 09:01 WhiteMagic

Is there a fix yet for the failed to load script error? This happened to me last night after I turned on launch at startup and I am no longer able to get into Joystick Gremlin to edit or load scripts.

Ferbles avatar Apr 04 '22 16:04 Ferbles

No there hasn't been any work on the autostrart bit.

WhiteMagic avatar Apr 09 '22 14:04 WhiteMagic

Same Issue with the autostart here. Seems to work fine if startetd manually after windwos startup.

Dschonny avatar Apr 09 '23 12:04 Dschonny

I, too, am having an issue with autostart. Starting manually works fine. Using Windows 11. Not sure what other info might be needed.

HalinReno avatar Apr 17 '23 23:04 HalinReno

i did managed to launch automatically gremlin by creating the vbs script proposed few post above, then adding it to app starting folder :

  1. type run
  2. shell:startup
  3. added a shorcut to from joystick_gremli.vbs into this folder
  4. you're done

Gravitys34 avatar Apr 23 '23 14:04 Gravitys34

i did managed to launch automatically gremlin by creating the vbs script proposed few post above, then adding it to app starting folder :

  1. type run
  2. shell:startup
  3. added a shorcut to from joystick_gremli.vbs into this folder
  4. you're done

One of the most elegant solutions to this issue.

Serpent03 avatar Jun 16 '23 04:06 Serpent03

The "Failed to execute script" error seems to be due to the working directory when started from the registry. I'm not sure what that gets set to, but it doesn't seem to be the folder containing the exe. Here's a quick work-around using vbscript to change the directory and launch the exe to allow Joystick Gremlin to start with windows:

(Assuming Joystick Gremlin is installed to default location)

  1. Create the file C:\Program Files (x86)\H2ik\Joystick Gremlin\joystick_gremlin.vbs containing:
Set oShell = CreateObject ("Wscript.Shell") 
Dim strArgs
strArgs = "cmd /c cd ""C:\Program Files (x86)\H2ik\Joystick Gremlin\"" & joystick_gremlin.exe"
oShell.Run strArgs, 0, false

You'll need to change the path if installed to a different location.

  1. Enable the Start Joystick Gremlin with Windows option, then change the registry key Computer\HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\Joystick Gremlin from .exe to .vbs (ie change to C:\Program Files (x86)\H2ik\Joystick Gremlin\joystick_gremlin.vbs)

This was fantastic advice.

AustinTylerDean avatar Jan 01 '24 19:01 AustinTylerDean

This is still happening. I tried the vbs (and regedit), and it just throws another error about not liking the vbs file.

Kriptoker avatar Jun 08 '24 23:06 Kriptoker