The Papaw Posted December 17, 2020 Share Posted December 17, 2020 18 minutes ago, Koroth said: You can close a program by using a window title/class name or a process name. You don't need a full path for that (if I understand you correctly.) Let me know if it works. No, neither way is killing the process. It continues running. I assume I am to put it in the emulators Exit AHK Script section, correct? Quote Link to comment Share on other sites More sharing options...
Your Friendly A.I Overlord Posted December 17, 2020 Share Posted December 17, 2020 No, in the running autohotkey section. Quote Link to comment Share on other sites More sharing options...
The Papaw Posted December 17, 2020 Share Posted December 17, 2020 4 minutes ago, Koroth said: No, in the running autohotkey section. I tried it both ways, still not ending DS4. Tried this: Run, "D:\Program Files (Portable)\DS4Windows\DS4Windows.exe" $Esc:: { Process, Close, DS4Windows.exe } and this: Run, "D:\Program Files (Portable)\DS4Windows\DS4Windows.exe" $Esc:: { WinClose, ahk_exe DS4Windows.exe } DS4 keeps running Quote Link to comment Share on other sites More sharing options...
The Papaw Posted December 17, 2020 Share Posted December 17, 2020 Would I need to include the emulator in the WinClose line as well as DS4? Quote Link to comment Share on other sites More sharing options...
Your Friendly A.I Overlord Posted December 17, 2020 Share Posted December 17, 2020 (edited) A few things come to mind. I use DS4Windows myself and there are a few things to consider. First, in the DS4Windows settings there is a checkbox "Hide DS4 Controller". If that is checked it starts DS4Windows with admin rights and needs to be closed via a script with admin rights. Second, there is also a checkbox "Close Minimizes". Make sure that one is unchecked. *Edit* I myself have the checkbox "Start Minimized" checked. Edited December 17, 2020 by Koroth Quote Link to comment Share on other sites More sharing options...
Your Friendly A.I Overlord Posted December 17, 2020 Share Posted December 17, 2020 1 minute ago, Wanderer189 said: Would I need to include the emulator in the WinClose line as well as DS4? That depends. If the emulator already closes then it is not necessary. If it doesn't then, yes. Quote Link to comment Share on other sites More sharing options...
The Papaw Posted December 17, 2020 Share Posted December 17, 2020 12 minutes ago, Koroth said: A few things come to mind. I use DS4Windows myself and there are a few things to consider. First, in the DS4Windows settings there is a checkbox "Hide DS4 Controller". If that is checked it starts DS4Windows with admin rights and needs to be closed via a script with admin rights. Second, there is also a checkbox "Close Minimizes". Make sure that one is unchecked. *Edit* I myself have the checkbox "Start Minimized" checked. Currently working with Yuzu I did not have "Hide DS4 Controller" checked. I DID have "Close Minimizes" checked, sure never thought of that one, lol, but unchecked it now. Do have "Start Minimized" checked as well. Does DS4 end for you when you exit a game? I still have to exit it from the taskbar. Here is SS of DS4 settings and LB to make sure we are on the same page here.... Quote Link to comment Share on other sites More sharing options...
Your Friendly A.I Overlord Posted December 17, 2020 Share Posted December 17, 2020 It looks right to me. But some programs are harder to close then others. As a last resort (because I do not find it a elegant solution), you could try: $Esc:: { Run, TASKKILL /F /IM DS4Windows.exe } This should kill DS4Windows Quote Link to comment Share on other sites More sharing options...
Your Friendly A.I Overlord Posted December 17, 2020 Share Posted December 17, 2020 14 minutes ago, Wanderer189 said: Does DS4 end for you when you exit a game? My situation is a little different then yours. I have DS4Windows run at system boot. So all my games and emulators see my DS4 Controller as a Xbox 360 controller. The only emulator that I want to exit DS4Windows for is Rpcs3, witch has native support for the DS4 and it's gyro functions. But in the DS4Windows settings I have "Hide DS4 Controller" checked to prevent double inputs. But that starts DS4Windows with admin rights, so I use an elevated script to exit DS4Windows when I start a game in Rpcs3. Then when I exit a game in Rpcs3 I run DS4Windows again. (All this via the Running Autohotkey tab for Rpcs3.) Quote Link to comment Share on other sites More sharing options...
The Papaw Posted December 17, 2020 Share Posted December 17, 2020 11 minutes ago, Koroth said: It looks right to me. But some programs are harder to close then others. As a last resort (because I do not find it a elegant solution), you could try: $Esc:: { Run, TASKKILL /F /IM DS4Windows.exe } This should kill DS4Windows Sadly, doesn't work either. I know nothing about AHK, is there anything Win10 needs that I amy be missing? Everything on system is up-to-date. I have a bat file to kill it that works. I tried to add it to AHK: Run, "D:\Program Files (Portable)\DS4Windows\DS4Windows.exe" $Esc:: { Run, "D:\Gaming\DS4Windows\DS4W Off.bat" } It doesn't work when I add it to the script (if I called it right) Quote Link to comment Share on other sites More sharing options...
The Papaw Posted December 17, 2020 Share Posted December 17, 2020 2 minutes ago, Koroth said: My situation is a little different then yours. I have DS4Windows run at system boot. So all my games and emulators see my DS4 Controller as a Xbox 360 controller. The only emulator that I want to exit DS4Windows for is Rpcs3, witch has native support for the DS4 and it's gyro functions. But in the DS4Windows settings I have "Hide DS4 Controller" checked to prevent double inputs. But that starts DS4Windows with admin rights, so I use an elevated script to exit DS4Windows when I start a game in Rpcs3. Then when I exit a game in Rpcs3 I run DS4Windows again. (All this via the Running Autohotkey tab for Rpcs3.) I was trying to do the same thing a few months back, but never got it working. Recently, I have had a couple PC games having issues when DS4 is running, like Trine 4 and a couple others. So I thought I might just call on DS4 per emulator as needed. Got to have the gyro features in Yuzu and Cemu, ya know? Quote Link to comment Share on other sites More sharing options...
The Papaw Posted December 17, 2020 Share Posted December 17, 2020 (edited) So how did you accomplish this: "so I use an elevated script to exit DS4Windows when I start a game in Rpcs3. Then when I exit a game in Rpcs3 I run DS4Windows again. (All this via the Running Autohotkey tab for Rpcs3.)" Edited December 17, 2020 by Wanderer189 Quote Link to comment Share on other sites More sharing options...
Your Friendly A.I Overlord Posted December 17, 2020 Share Posted December 17, 2020 4 minutes ago, Wanderer189 said: So how did you accomplish this: "so I use an elevated script to exit DS4Windows when I start a game in Rpcs3. Then when I exit a game in Rpcs3 I run DS4Windows again. (All this via the Running Autohotkey tab for Rpcs3.)" By first making a .bat file that kills DS4Windows and than compile that to an .exe that can be run with admin rights. To prevent UAC pop-ups I created elevated shortcuts to that .exe via Task Scheduler that I run in the running autohotkey tab for Rpcs3. More info here: https://www.tenforums.com/tutorials/57690-create-elevated-shortcut-without-uac-prompt-windows-10-a.html It may all be a bit convoluted, but hey, for me tinkering is half the fun of emulation. I'm sorry that closing DS4Windows doesn't work for you, but at this moment I'm all out of ideas. If something comes to mind I will let you know. Quote Link to comment Share on other sites More sharing options...
JoeViking245 Posted December 17, 2020 Share Posted December 17, 2020 35 minutes ago, Wanderer189 said: I have a bat file to kill it that works. What does the bat file look like? Quote Link to comment Share on other sites More sharing options...
The Papaw Posted December 17, 2020 Share Posted December 17, 2020 1 minute ago, JoeViking245 said: What does the bat file look like? @echo off taskkill /F /im DS4Windows.exe exit Quote Link to comment Share on other sites More sharing options...
The Papaw Posted December 17, 2020 Share Posted December 17, 2020 7 minutes ago, Koroth said: By first making a .bat file that kills DS4Windows and than compile that to an .exe that can be run with admin rights. To prevent UAC pop-ups I created elevated shortcuts to that .exe via Task Scheduler that I run in the running autohotkey tab for Rpcs3. More info here: https://www.tenforums.com/tutorials/57690-create-elevated-shortcut-without-uac-prompt-windows-10-a.html It may all be a bit convoluted, but hey, for me tinkering is half the fun of emulation. I'm sorry that closing DS4Windows doesn't work for you, but at this moment I'm all out of ideas. If something comes to mind I will let you know. You been a great help and I appreciate your time. I understood most of that, but not how you compile an exe from a bat file??? Quote Link to comment Share on other sites More sharing options...
Your Friendly A.I Overlord Posted December 17, 2020 Share Posted December 17, 2020 1 minute ago, Wanderer189 said: @echo off taskkill /F /im DS4Windows.exe exit Yes, exactly. Quote Link to comment Share on other sites More sharing options...
Your Friendly A.I Overlord Posted December 17, 2020 Share Posted December 17, 2020 1 minute ago, Wanderer189 said: You been a great help and I appreciate your time. I understood most of that, but not how you compile an exe from a bat file??? I used a program called: Bat_To_Exe_Converter Quote Link to comment Share on other sites More sharing options...
The Papaw Posted December 17, 2020 Share Posted December 17, 2020 What did you use for this part:? " (All this via the Running Autohotkey tab for Rpcs3.)" Quote Link to comment Share on other sites More sharing options...
Your Friendly A.I Overlord Posted December 17, 2020 Share Posted December 17, 2020 I'll post my autohotkey script that I use in the running autohotkey tab for Rscp3. This script only works for me because it's specific to my situation: SetTitleMatchMode, 2 SendMode Input SetWorkingDir %A_ScriptDir%\..\.. Run, %A_WorkingDir%\Opstarten\DS4WinTaskkill.lnk Loop { if WinExist("Building SPU cache...") If (ErrorLevel = 0 ) { WinActivate, Building WinMaximize, Building WinSet, AlwaysOnTop, Break } Else Sleep 1000 Continue } WinWait, FPS ahk_class Qt5QWindowIcon WinActivate, Sleep 500 Send, !{Enter down} Sleep 200 Send, !{Enter up} Sleep 500 MouseMove, 3840, -2160, 0 $Esc:: { Send, {Esc down} Sleep 100 Send, {Esc up} Sleep 500 Send ^{p down} Sleep 100 Send ^{p up} Sleep 500 Send, {Esc down} Sleep 100 Send, {Esc up} Sleep 500 Send ^{s down} Sleep 100 Send ^{s up} Sleep 1000 Process, Close, rpcs3.exe Run, "\LaunchBox\Opstarten\DS4Windows.lnk" } Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.