Jump to content

All my products and services are free. All my costs are met by donations I receive from my users. If you enjoy using any of my products, please donate to support me. My bare hosting costs are currently not met so please consider donating by either clicking this text or the Patreon link on the right.

Patreon

Recommended Posts

Posted

Hi,

I have a few games installed that require me to disable or enable different controllers. I wrote some scripts and they work fine but I can get the LAUNCH AFTER script to run when I exit or kill the game. The LAUNCH ALSO script runs fine though.

I try by Exiting the game via its menu and also with the Escape key that kills the game. 

I've attached my log and config for 1 game that uses it.

 

Thanks

 

Screenshot (3).png

log - Copy.txt

Posted

Hi,

Thanks for getting back to me Draco. I've attached the files but in doing so I think I see the problem.

The "script" I have is to close the app i use to emulate Xbox controllers (Keyboard2Xinput) and then it turns on a special USB hub with all my other controller to return the cab to "Normal"

I think the issue is that to exit Keyboard2Xinput youre supposed to to press * (asterixis) so I was using SENDINPUT and that works outside GAMEEX but once GAMEEX is running the * doesn't work.

I'm messing around with TASKKILL but thats not killing the process.... Any Ideas?

GameEx.ini XBOXControllersOFF.ahk

Posted

What command line are you using for TASKKILL including switches? Have you opened Task Manager and watched the processes to see if the process is actually being "killed" by your command line via a command prompt?

If that does not work try issuing the command line from an elevated command prompt (e.g. Run as administrator).

Posted

I have Taskkill working but only running as Administrator. I use a program that creates an Elevated shortcut but gameex doesn't run it. Actually in the log no matter what GameEx doesn't run the program in the LAUNCH AFTER line.

Shouldn't it at least show it trying to run it even if the script is no good?

XBOXControllersOFF.txt GameEx.ini log.txt

Posted

Does Keyboard2XinputGui.exe show as a process number (PID) in the instead of the app name in Services tab within Task Manager? If so, try using the PID instead of the app name in your Taskkill command line. This is, of course, under the assumption that the PID is always the same.

Posted

Ya I tried that too, it changes pid numbers.

so you don’t think it’s gameex that not calling on the file at the end?

Posted

Not sure, really. 

In you emulator config, what is the purpose of the AlsoLaunch  line?

LaunchAfter=E:\Program Files\Scripts\XBOXControllersOFF.exe
LaunchBefore=
OLDatZip=
AlsoLaunch=E:\Program Files\Scripts\XBOXControllersON.exe

Seems to me that this would cause a conflict if one is shutting down the app followed by a command to launch it. My thought is it should be in LaunchBefore. This may need Tom's eyes.

Posted

Ok so I tested LAUNCH BEFORE and LAUNCH AFTER with different EXE's and it works so there is something with the EXE I create with Auto Hot Keys that GameEX doesn't like. 

Theres really nothing fancy in them, they just load or kill another program.

Any ideas?

XBOXControllersOFF.ahk XBOXControllersON.ahk

Posted

No I haven’t tried Powershell. Haven’t really ever used it especially making a script for it. But I’ll look into it.

I tried batch files instead and they don’t run either. I’d love to know what criteria GameEc “looks for” in Launch Before & Launch after. I’ll try some more tomorrow.

Posted
6 hours ago, Tom Speirs said:

PS: Not sure how powershell will help here.

Just a suggestion to test killing a task running powershell instead of command prompt script. We have run into issues in the past with command prompt taskkill for processes not working but use of powershell worked.

  • 5 weeks later...
Posted

Hi,

 

I'm just getting back to solving issues on my cab and I'm back at this one.

I haven't tried Powershell just yet (don't really know where to start with it because I never use it) but I noticed something while looking over my situation...

When I VERIFY my setup I have no errors except this ;

Verifying Emulator 34: PAW Patrol The Movie Adventure City Calls...
         Launch After: "E:\Program Files\Scripts\XBOXControllersOFF.LNK" does not exist.
Verifying Emulator 35: [HandHeld] Game And Watch...
Verifying Emulator 36: [HandHeld] Sony PSP Minis...
Verifying Emulator 37: [Console] Sony Playstation...
Verifying Emulator 38: [Console] Sega CD...
Verifying Emulator 39: [HandHeld] Neo-Geo Pocket Color...
Verifying Emulator 40: [HandHeld] Sony Playstation Portable...
Verifying Emulator 41: [Console] SG-1000...
Verifying Emulator 42: RoBlox...
Verifying Emulator 43: Mighty Pups Save Adventure Bay...
         Launch After: "E:\Program Files\Scripts\XBOXControllersOFF.LNK" does not exist.
Verifying Emulator 45: PJ MASKS HEROES OF THE NIGHT...
         Launch After: "E:\Program Files\Scripts\XBOXControllersOFF.LNK" does not exist.
Verifying Emulator 46: PAW PATROL: Grand Prix...
Verifying Emulator 47: My Friend Peppa Pig...
         Launch After: "E:\Program Files\Scripts\XBOXControllersOFF.LNK" does not exist.
Verifying Emulator 48: Race With Ryan...
         Launch After: "E:\Program Files\Scripts\XBOXControllersOFF.LNK" does not exist.
Verifying Emulator 49: Ryans Rescue Squad...
Verifying Emulator Groups...
Verifying HTML Applications...

 

For some reason no matter if I use a Shortcut, an EXE, or BAT, GameEx says they don't exist. They 100% Exist but theres something about them that GameEx doesn't like loading...

Posted

Any reason for having your scripts within E:\Program Files\ rather than a dedicated directory? Typically this is elevated protections for this and other Windows directories.

Posted

You nailed it Draco!

I moved everything to the root of E:\ and it works. So strange that the script at Launch BEFORE works but AFTER was having an issue. 

Thanks for all your patience and help as usual.

Now on to the other issue!!! 🥳

  • Draco1962 changed the title to [RESOLVED] Launch After not working
Posted

Hey Tom,

I already had quotes on the on the path if that's what you're talking about but maybe when I moved things outside of E:\Program Files to just E:\ that fixed the quotes being needed because of the spaces I removed from folder names? 

ORIGINAL SCRIPT

run, taskkill /F /IM  Keyboard2XinputGui.exe
Sleep, 1000  ; sleep 1 second

run, "E:\Program Files\YEPKIT LDA\ykushcmd\ykushcmd.exe" -u a

 

NEW SCRIPT

run taskkill /im Keyboard2XinputGui.exe /f
Sleep, 1000  ; sleep 1 second

run, "E:\YEPKIT\ykushcmd\ykushcmd.exe" -u a

 

Guest
This topic is now closed to further replies.
×
×
  • Create New...