Jump to content
LaunchBox Community Forums

Yepkit YKUSH - Switching USB controllers at Mame startup


natep87

Recommended Posts

Hi All

Hoping someone else has had some luck with this. I tried searching the forums but to be honest i am not sure what i am searching for. 

Basically the board switches power to usb devices via cmd. the reason i want too use it is to turn on my Ultimarc Ultrastik when Mame opens and turn off once finished. 

The reason for turn on and off is that windows refuses to go to sleep when it is connected, I have tried a few things with addtional apps etc. ( I have my servo sticks running for 4 way games etc that way) but no luck so far . 

Bascially for it all to work i open cmd, navigate to the programs folder then run an application with a parameter i.e ykushcmd.exe -d 1

I have very little expereince with batch files etc. but wondering if anyone else has used these usb switchs before. I know people have used them with ultra stiks but not sure about automation on startup on a front end like launchbox. 

 

Any help would be greatly appreciated. 

 

Nathan 

Edited by natep87
Link to comment
Share on other sites

So it looks like you want a batch file to automate what you're manually typing into a command prompt? Please explain more if I'm missing something. A batch file with what you type already would do exactly that. To prevent the command window from popping up though I'd use start command like this.

start PATH\TO\FILE\ykushcmd.exe -d 1 

 

However that will just start it and you won't be able to automate the closing. I'd recommend AHK script for this. It can wait to detect MAME has opened, run your program, wait to detect MAME has closed, then close your program.


 

WinWait, ahk_exe MAME.exe

Run, PATH\TO\FILE\ykushcmd.exe -d 1

WinWaitClose, ahk_exe MAME.exe

Process, Close, ykushcmd.exe

That can go into MAME emulator Running Script field or you can make the AHK file and then use it as an Additional Application for the various games you want it to launch along with.

 

Haven't heard of these things before. I honestly would have thought a switchable hub would do the same thing for what you want to do here. It would cost less, and have more ports too. I have two of these. One for USB 2.0 and one for USB 3.0. It allows me to "unplug/plug-in" wired controllers without actually physically unplugging or plugging them in. Hence why I think it would work for your particular use case, you want to plug-in and unplug a device while leaving it physically connected to the PC. I use them in tandem with other "switchers" that link these hubs to either my PC/Hackintosh, or to my genuine Apple system. Link for hub with switches ex: https://www.amazon.com/gp/product/B00BWF5U0M/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...