Jump to content
LaunchBox Community Forums

Start & Stop Programs or use Scripts


The Papaw

Recommended Posts

I am looking for a way to run DS4Windows with a particular emulator or game as well as a way to kill it on exit if it is running.  

The main issue I am trying to overcome is some PS3 games use the gyro features with a DS4 controller using RPSC3, but if DS4Windows is running, the gyro features don't work if I set up the controllers with it running, it thinks I am using 360 controllers. I started scrolling through the AHK scripts, but there are so many to go through (it would be nice if they could be put in sub-categories maybe???).

Any suggestions on how I might do this??

 

Link to comment
Share on other sites

May I ask what might be a very stupid question. 

DS4Windows is to allow the PS4 controller to be used on Windows PC and let's it allowed to be seen as a Xbox controller-hopefully I understand that correctly. 

But why not have it so that it is seen as an actual real PS4 controller in Windows rather than faking it as a Xbox controller? Then surely you could just plug it in/turn it on when you needed it rather than messing around loading other programs and using ahk/bat files to open and close them when you want to use PS4 controller.

I used to fake the PS3 controller through Windows as Xbox but it is much easier to use with Windows now able to see it as an actual PS3 controller. 

All I did was install the PS controller drivers from the PlayStation Now download, I don't use the rest of the download as I don't need it, and this way Windows sees the controllers as PS controllers. 

Hopefully the link is OK to put on here. 

https://www.playstation.com/en-gb/explore/playstation-now/ps-now-on-pc/

Of course it might mean having to change/reset key binding on other things so might be more hassle than worth. 

Anyway if this isn't any good to you then feel free to ignore it and apologies for wasting your time. 

 

The other options would be to make a "launcher" that assuming DS4Windows isn't running all the time, loads up DS4Windows before RPSC3, then passes the name of the game to RPSC3 so that it opens, waits for RPSC3 to close and on close then kills DS4Windows programme as returns to LB or BB.

This could be done via a batch file, if you want to go down that road and need any help then just ask. 

Edited by Kiinkyfoxx
Extra info
Link to comment
Share on other sites

39 minutes ago, Kiinkyfoxx said:

May I ask what might be a very stupid question. 

DS4Windows is to allow the PS4 controller to be used on Windows PC and let's it allowed to be seen as a Xbox controller-hopefully I understand that correctly. 

But why not have it so that it is seen as an actual real PS4 controller in Windows rather than faking it as a Xbox controller? Then surely you could just plug it in/turn it on when you needed it rather than messing around loading other programs and using ahk/bat files to open and close them when you want to use PS4 controller.

I used to fake the PS3 controller through Windows as Xbox but it is much easier to use with Windows now able to see it as an actual PS3 controller. 

All I did was install the PS controller drivers from the PlayStation Now download, I don't use the rest of the download as I don't need it, and this way Windows sees the controllers as PS controllers. 

Hopefully the link is OK to put on here. 

https://www.playstation.com/en-gb/explore/playstation-now/ps-now-on-pc/

Of course it might mean having to change/reset key binding on other things so might be more hassle than worth. 

Anyway if this isn't any good to you then feel free to ignore it and apologies for wasting your time. 

 

The other options would be to make a "launcher" that assuming DS4Windows isn't running all the time, loads up DS4Windows before RPSC3, then passes the name of the game to RPSC3 so that it opens, waits for RPSC3 to close and on close then kills DS4Windows programme as returns to LB or BB.

This could be done via a batch file, if you want to go down that road and need any help then just ask. 

Thx for the reply. I need to run DS4W when using emulators such as Cemu, Yuzu and now Dolphin in order for the gyro functions to work with them. With RPSC3, I don't need it. I have been running a batch file in my homeautomation setup to start DS4W when it switches everything to TV, but I don't know how to kill it from within BB. Say I am playing something that is using DS4W in Yuzu in BB, then I quit that game and want to go to a PS3 game without using DS4W. I don't know how to kill it before launching a game that uses the RPSC3 emulator....

Link to comment
Share on other sites

So if I'm correct you want the following

1)click on PS3 game in BB/LB

2)DS4W closes

3)PS3 game opens WITHOUT DS4W

4)PS3 game played and closed 

5)DS4W opens

6)Back to BB/LB

If wrong order can you please give correct order and then send in a text file the following and I will do you a batch file for it. 

Full path to DS4W including exe name

Full path to PS3 emulator including exe name

Any parameters used in default command line for PS3 emulator within LB

The contents of your bat file that normally loads DS4W when switches to TV

I think that will be easy then trying to do the commands via here. 

Cheers

Edited by Kiinkyfoxx
Link to comment
Share on other sites

I have a larger PC setup in a bedroom, above it hangs a 55" 4k big screen TV also connect to the PC. I use a Hubitat hub for my home automation with Alexa/Google Home and my own personal voice setup so I can use voice commands without internet. So using Alexa as an example, here is what I do to play games:

I give Alexa a command to tell my computer to play games, this triggers an Alexa routine that will change the HDMI source on the TV, then it runs a program on the PC that runs a batch file I created that will launch 3 applications, 1) Run DS4W; 2) App to change the video and audio sources the PC will use; 3) then runs BB. Then I have another bat file to put things back.

The order you have would work so long as it doesn't close and open LB/BB each time. I have a large library and it takes a minute or 2 to load each time. That is why I am looking for a way to do it within LB/BB

 The paths I am using are:

RPCS3 = D:\Gaming\Emulators\RPCS3\rpcs3.exe
DS4W = D:\Program Files (Portable)\DS4Windows\DS4Windows.exe

I attached the bat file I run on the PC to start things on the PC side

Play Games.bat

Link to comment
Share on other sites

Try somthing like below -The RPCS3 line is a bit of a guess as I normally wouldn't do it this way but I am trying to keep with your layout. Bascially the %1 is my guess and it should be the full file path of the game within quotations

 

taskkil /IM DS4Windows.exe /F

Pause

start/wait "RPCS3" /B  "D:\Gaming\Emulators\RPCS3\rpcs3.exe" %1

Pause

start "ds4windows" /B "D:\Program Files (Portable)\DS4Windows\DS4Windows.exe"

Pause

exit
 

Make it into a bat file.

Rest is from memory as at work but give it a try and look for the nearest name thing if I get a name wrong

Make a new emulator-I have one called trial that I use for testing stuff out

Set it up so that no boxes are ticked on emulator tab

Set the pathway to the new bat file as emulator

Add PS3 as a platform but don't make it default

Turn OFF start up screen and shutdown screen for trial run

Change one game only on PS3 to use this new emulator

Load that game-as you can see it is made so that it shows each process and then pauses so you can check it is working.

If it works great-just remove the pauses and add @echo off on the top and then go into emulator tab and tick hide the window box in bottom left hand corner. You can then put start up screens back on and it all should work-still using the trial one at this point.

If that all works you then just need to set it up to be the correct PS3 emulator choice and maybe give it a nicer name than trial.

Goodluck

Ps if you see a better way or improve it then please let me know

Link to comment
Share on other sites

21 hours ago, Kiinkyfoxx said:

Try somthing like below -The RPCS3 line is a bit of a guess as I normally wouldn't do it this way but I am trying to keep with your layout. Bascially the %1 is my guess and it should be the full file path of the game within quotations

 

 

How would you run a bat file from inside of BB? Wouldn't this just be a normal Windows bat file? I would think there would be a simple way using a AHK script under the emulator settings "Running AutoHotKey Script" and "Exit AutoHotKey Script"

Can you run bat files in the emulator settings "Running AutoHotKey Script" and "Exit AutoHotKey Script"?

Link to comment
Share on other sites

Ok lets try this again now that I'm not at work and can write a better guide for you.

Maybe you can do it via AHK scripts in the "Running AutoHotKey Script" and "Exit AutoHotKey Script" but that isn't the way I know how to do it and requires you to put it in twice and I could be wrong here, but I thought you wanted DS4W shut before the emulator started up and I don't know when the Running AHK script actually starts but at a guess it is when the emulator is running from the name.

1)Download the RPCS3 Launher bat file below- it is the same as the one above but premade and put it where ever you keep your bat files - just remember the path

2)Open LAUNCHBOX not BigBox

3)Add a new Emulator -Call it whatever you want I call mine Trial so I can use it for practising

4)Set up details page like mine-but with the pathway for the downloaded file as above and not as mine

image.thumb.png.c50d3165bfefc90ace3f68099bf5af01.pngThis is the "emulator" this bat file will close DS4W and open RPSC3 with game and then when that closes will restart DS4W (well it will if the bat file is correct)

5)Complete Associated Platforms tab-I don't do PS3 stuff so have no idea what you need to put in here but at a guess Sony Playstation 3?? or whatever you have called the platform

6)Close with OK button so it saves

7)Go to PS3 platform-pick a game-Edit the game so that it uses the "Trial" Emulator

image.thumb.png.04e4f12b9613e190706d1207aa466afb.png8)Close with OK so it saves - if the game you pick has custom load up screens setting you need to remove those before closing out with ok

9)Load that game-The following should happen

No load up screen----but instead a Windows cmd box that shuts down DS4Windows.exe and then pauses so you can check it has closed it down-if not and gives an error msg you should be able to troubleshoot-I may have got pathway wrong

After pressing any key it should load RPSC3 and the game that you have picked as said before this is the bit that I have done differently for you to keep with your bat file design and without RPSC3 here I can not test it will work-It MIGHT open the game and then go back to cmd window but don't worry about this. Refocus RPSC3 and close it however you normally would.

Cmd window should show a pause-press any key and DS4W should reload-check it has-if not then troubleshoot--press any key and then cmd window should close

IF that has all worked then you can tidy up the bat by removing all the pauses and put @echo off at top.

10)IF the above has worked change the actual emulator you normally use for PS3 to be set up as this trial one, BUT you can turn on the start up screen and details screen look like this

image.thumb.png.40b0eb6ed5636dff89ebaa7b72ca4bee.pngwhich should hide the cmd line window and let RPCS3 keep focus.

 

Can you run bat files in the emulator settings "Running AutoHotKey Script" and "Exit AutoHotKey Script"?

yes you can just direct the ahk to the bat file

Hopefully all that makes more sense.

RPCS3 Launcher.bat

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