Jump to content
LaunchBox Community Forums

Additional Apps timing issues


SCKiller8180

Recommended Posts

Hi, 

I was wondering if anyone can help with a solution to an issue i have? In short I'm having issues with the wii remotes. I use Windows 10 and that messes with the joypad configuration so i simply turn off the dolphin bar when I'm not using the wiimotes as this constantly messes with my xinput joypads in retroarch. Simple enough. I've been using touchmote to use wiimote as a dummy xinput and assign the stick to the pointer to play light gun games which works well. I run these games separate in mame. This works well until i use Bigbox. I normally turn off touchmote after because it clashes with dolphin for the wii games. I configured it to start touchmote when running say operation wolf in mame from big box which it does but this doesnt give it enough time to pair with the remote and then its undetected in mame (or retroarch when i tried it). When im on the desktop i just wait obviously but from bigbox i need to make a delay some how from launching the game, to start the additonal app touchmote, average 5 secs to pair wiimote then start operation wolf. Then kill touchnote on game exit. Any help or solutions would be very welcome. Thanks. 

Link to comment
Share on other sites

Somewhere on this forum there is a solution to the dolpin bar, gamepad and retroarch issue. I read it somewhere some time ago. Maybe have a search.

 

May be a bit of a ball ache and they may be better ways of doing this... anyway.

Can try using autohotkey.

 

Go to your launchbox autohotkey directory. C:/Users/blah blah/Launchbox/Autohotkey.

Copy and paste (dont move) Autohotkey.exe to your mame directory.

Rename the new Autohotkey.exe to lets say... "mame Launcher.exe"

Create a .txt file in the same directory. Rename it to "mame launcher.ahk". (the .exe and .ahk need to have the same name)

Right click on "mame launcher.ahk", click edit or open with notepad.

Copy and paste the following:

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
#SingleInstance, Force
#Persistent

Sleep, 5000
Run, retroarch.exe "%1%" "%2%" "%3%"
Sleep, 1000

SetTimer, ProcessCheckTimer, 2000
Return
 
ProcessCheckTimer:
Process, Exist, retroarch.exe
pid1 := ErrorLevel
If (!pid1)
         {
	 Process, Close, touchmote.exe
         ExitApp
         }
Return

Iv used retroarch here, dont ask me why lol. I dont have mame.

 

You will have to change some things in this script:

Sleep, 5000... Basically wait 5 seconds. Change if needed. 1000 = 1 second, 2000 = 2 seconds and so on.

Run, retroarch.exe "%1%" "%2%" "%3%"... Change retroarch.exe to mames .exe. 

Process, Exist, retroarch.exe... Change retroarch.exe to mames .exe. 

Process, Close, touchmote.exe... I dont know touchmotes .exe so make sure that is correct as well.

 

File, save.

 

In launchbox.

Go to tools, manage emulators.

Add.

Give it whatever name you want.

Application path, browse to "mame launcher.exe"

All the other settings like command line parameters etc, need to match your mame emulator settings. Except dont tick the default emulator box.

OK

Find a game (or you can bulk edit, maybe test it with one game for now) you want to use touchmote with. "operation wolf" for example.

Right click and edit.

Emulation tab.

Under the "Choose emulator" option, choose your newly added emulator.

Then give it a try.

 

You could also have the script run touchmote instead of having to add it as an additional app to multiple games, like so:

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
#SingleInstance, Force
#Persistent

Run path-to-touchmote
Sleep, 5000
Run, retroarch.exe "%1%" "%2%" "%3%"
Sleep, 1000

SetTimer, ProcessCheckTimer, 2000
Return
 
ProcessCheckTimer:
Process, Exist, retroarch.exe
pid1 := ErrorLevel
If (!pid1)
         {
	 Process, Close, touchmote.exe
         ExitApp
         }
Return

Change "path-to-touchmote".

Anyway good luck.

 

 

 

 

Edited by jayjay
Link to comment
Share on other sites

Yeah would be useful.  I guess it would fall under the "expand additional apps" on the poll, we maybe waiting a while as its low on the poll. Something like... delay main executable for a "user defined" amount of seconds would be good.

 

@Retro808 you can use the ahk method above for windows games etc without having to add it as emulators in launchbox, you would instead point the launchbox game launcher tab to the script. Which would then run the additional app, wait X amount of seconds then run the game. If u need a method reply with the games .exe and the additional apps .exe, if not just ignore me... or what might be better is if we create a load of fake accounts and vote "expand additional apps" up the poll ;) lol.

  • Like 1
Link to comment
Share on other sites

5 minutes ago, Retro808 said:

Thanks @jayjay The exe I use allows pc games that do not map 2 players games like Mortal Kombat XL to a single key board. The name of the file is XArcade XInput.exe and game example MK10.exe

Ok so its similar to the method above.

 

Copy Autohotkey.exe to the same directory as MK10.exe.

Rename it to anything you want. Lets say... MK10 Launcher.exe.

Create a txt file in the same directory and rename it to... MK10 Launcher.ahk.

Right click on MK10 Launcher.ahk, edit or open with notepad.

Copy and paste the following:

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
#SingleInstance, Force
#Persistent

Run path-to-XArcade XInput.exe
Sleep, 5000
Run, MK10.exe
Sleep, 1000

SetTimer, ProcessCheckTimer, 2000
Return
 
ProcessCheckTimer:
Process, Exist, MK10.exe
pid1 := ErrorLevel
If (!pid1)
         {
	 Process, Close, XArcade XInput.exe
         ExitApp
         }
Return

So in the script you have the 1st run command, where you will have to add the path to XArcade XInput.exe.

Next you have sleep 5 seconds. You may need to change the length of time depending on how long XArcade takes to open.

Then it runs MK10.exe.

Then another sleep command, which you may also need to change, basically you want mk10.exe to open before the script moves on to the set timer command.

The timer checks every 2 seconds for the process MK10.exe, when it doesn't find it (when you exit MK10) it then closes XAracde XInput.exe.

 

File, Save.

In Launchbox find Mortal Kombat, right click, edit.

Launcher tab, change the path to MK10 Launcher.exe.

 

Dont forget to remove the additional app from Mortal Kombat otherwise it will try opening XArcade twice.

Let me know how it goes.

 

  • Thanks 1
Link to comment
Share on other sites

@jayjay Worked like a charm!!! Man I cannot thank you enough for the assist. I figured an AHK would do what I need, but I have only entry level skill with it. Just need to tweak the sleep times and follow the steps for about 3 more games and I am golden. Huge thanks again for this.

  • Like 1
Link to comment
Share on other sites

I've given both examples a go but I'm not getting any joy. I've been over again and again to make sure there are no rookie mistakes but I keep recieving an error box with "script file not found: (path blah blah)\MAME\opwolfb". This is clicking on operation wolf from desktop launchbox. Touchmote starts and this pops up. There is no script called "opwolfb", just the MAME files and the MAME Launcher.exe and MAME Launcher.ahk I made as your instructions. I've tried renaming the MAME Launcher.ahk to opwolfb.ahk and fiddled around but no luck. I've checked and double checked command lines and the MAME emulator and the MAME Launcher emulator I created are identical. Any ideas? could MAME be a bit different to retroarch?
 @jayjay

Link to comment
Share on other sites

Yeah mame is no doubt different from retroarch. I will play with mame when I get a chance but might not be til the weekend, I work long hours.

 

Change Mame Launcher.exe to run as admin. Prob wont do anything but worth getting that  option out of the way.

Just out of curiosity try replacing the Mame Launcher.ahk with this and reply with what is in the message boxes.

msgbox %1%
msgbox %2%
msgbox %3%
msgbox %4%
msgbox %5%

 

Link to comment
Share on other sites

Ok couple of things.

Can you post screen shot of the error.

Can you post a screen shot of your mame directory, make sure that mame launcher.exe and mame launcher.ahk is in the screen shot.

And also go to your mame launcher.ahk file that you have placed inside your mame directory, double click on it. What happens? does it open notepad or do you get 5 empty message boxes?

Link to comment
Share on other sites

When I opened the ahk it opened with notepad and had the second text you asked me to try still, msgbox %1% etc. etc. I've included the original one that you posted that I personalised, just to make sure I've got that correct. I've ran this on my laptop (my normal builds under my tv on a dedicated machine) just to eliminate the possibility of a windows specific issue on that PC but it's the same.

scrn 1.jpg

scrn 2.jpg

scrn 3.jpg

Link to comment
Share on other sites

No worries, thanks for your efforts. I've found the workaround you mentioned for the retroarch & dolphin controller pooling so will probably head down that route. I've discovered today that if i use my xbox 360 controller to get to say operation wolf, turn it off and turn on my wiimote under touchmote it takes x input 0, which has been freed up, which retroarch prioritises as the input device for player 1. As long as i dont point at the reciever it doesnt scroll the game wheel in big box like a mad man so I'll try the text you gave me with retroarch in the script, so i can shut down touchmote immediately after exiting, turn on my proper 360 controller again and away we go. At least this way i dont need to change any settings, get up to touch the dolphon bar, just need to turn one controller off and one on and reverse order after, all without touching anything. Thanks again :)

  • Like 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...