Crabi Posted February 18, 2022 Posted February 18, 2022 (edited) Hi guys, i'm trying to launch joy2key profile when i start a game from a platform, (same emulator like retroarch for exemple) i did something like that : on running Script DetectHiddenWindows On if WinExist("JoyToKey") Process, Close , joytokey.exe DetectHiddenWindows Off sleep, 3000 Run, "D:\HFSBox\Utilities\JoyToKey\JoyToKey.exe" "D:\HFSBox\RocketLauncher\Profiles\JoyToKey\Sony Playstation\Sony Playstation.cfg" on exit script DetectHiddenWindows On if WinExist("JoyToKey") Process, Close , joytokey.exe DetectHiddenWindows Off sleep, 3000 Run, "D:\HFSBox\Utilities\JoyToKey\JoyToKey.exe" D:\HFSBox\Utilities\JoyToKey\Default.cfg That works manually but not with launchbox/bigbox (it works on running script but not on exit) Do you have any suggestions ? i'm a bit lost ^^' Thanks in advance Edited February 18, 2022 by Crabi Quote
JoeViking245 Posted February 18, 2022 Posted February 18, 2022 39 minutes ago, Crabi said: it works on running script but not on exit The Exit Script section is for when exiting the game from the Pause Menu. Put your exit script portion below what you have already in your Running Script. You'll need to add a hotkey label for the exit portion. Esc:: usually works Quote
Guest Posted February 18, 2022 Posted February 18, 2022 1 hour ago, Crabi said: Hi guys, i'm trying to launch joy2key profile when i start a game from a platform, (same emulator like retroarch for exemple) i did something like that : on running Script DetectHiddenWindows On if WinExist("JoyToKey") Process, Close , joytokey.exe DetectHiddenWindows Off sleep, 3000 Run, "D:\HFSBox\Utilities\JoyToKey\JoyToKey.exe" "D:\HFSBox\RocketLauncher\Profiles\JoyToKey\Sony Playstation\Sony Playstation.cfg" on exit script DetectHiddenWindows On if WinExist("JoyToKey") Process, Close , joytokey.exe DetectHiddenWindows Off sleep, 3000 Run, "D:\HFSBox\Utilities\JoyToKey\JoyToKey.exe" D:\HFSBox\Utilities\JoyToKey\Default.cfg That works manually but not with launchbox/bigbox (it works on running script but not on exit) Do you have any suggestions ? i'm a bit lost ^^' Thanks in advance Why are you using a script? You can add it as a third app per game and you can use a command line for loading profiles, check my pic : I made a bat for closing it after quitting a game and I added it as a third app but checking "Run after" If you need the bat code, here : @ECHO OFF taskkill /F /im JoyToKey.exe @ECHO ON GREETs Quote
Crabi Posted February 18, 2022 Author Posted February 18, 2022 1 hour ago, JoeViking245 said: The Exit Script section is for when exiting the game from the Pause Menu. Put your exit script portion below what you have already in your Running Script. You'll need to add a hotkey label for the exit portion. Esc:: usually works Thanks you so much, the script now work when i press Esc, but retroarch do not exit now this is weird. Autohotkey seems to take the priority ! 13 minutes ago, nohero said: Why are you using a script? You can add it as a third app per game and you can use a command line for loading profiles, check my pic : I made a bat for closing it after quitting a game and I added it as a third app but checking "Run after" If you need the bat code, here : @ECHO OFF taskkill /F /im JoyToKey.exe @ECHO ON GREETs i can't do that per game (1400 roms just for playstation) , that why i try to do it for a platform , or is there a way to do it on all game in one time ? 1 Quote
Guest Posted February 18, 2022 Posted February 18, 2022 You can do it selecting all games with a plugin made by JoeViking245. It's here on the forum GREETs Quote
JoeViking245 Posted February 18, 2022 Posted February 18, 2022 On 2/18/2022 at 7:08 AM, Crabi said: but retroarch do not exit now Esc:: DetectHiddenWindows On if WinExist("JoyToKey") Process, Close , joytokey.exe DetectHiddenWindows Off sleep, 3000 Run, "D:\HFSBox\Utilities\JoyToKey\JoyToKey.exe" D:\HFSBox\Utilities\JoyToKey\Default.cfg WinClose, ahk_exe retroarch.exe Add the last line. Quote
Crabi Posted February 18, 2022 Author Posted February 18, 2022 4 minutes ago, JoeViking245 said: Esc:: DetectHiddenWindows On if WinExist("JoyToKey") Process, Close , joytokey.exe DetectHiddenWindows Off sleep, 3000 Run, "D:\HFSBox\Utilities\JoyToKey\JoyToKey.exe" D:\HFSBox\Utilities\JoyToKey\Default.cfg WinClose, ahk_exe retroarck.exe Add the last line. Man i love you ! Thank you very much ! 23 minutes ago, nohero said: You can do it selecting all games with a plugin made by JoeViking245. It's here on the forum GREETs Oh nice ! i'll maybe try it for other platforms it could help a lot ! Thank you for the advice 1 Quote
damageinc86 Posted Saturday at 08:14 PM Posted Saturday at 08:14 PM (edited) On 2/18/2022 at 6:37 AM, JoeViking245 said: Esc:: DetectHiddenWindows On if WinExist("JoyToKey") Process, Close , joytokey.exe DetectHiddenWindows Off sleep, 3000 Run, "D:\HFSBox\Utilities\JoyToKey\JoyToKey.exe" D:\HFSBox\Utilities\JoyToKey\Default.cfg WinClose, ahk_exe retroarch.exe Add the last line. I was following an additional apps suggestion by someone else to launch joy2key and a profile, however i get some error message about not being able to write to the directory, which I have no idea why it would need to write, when it's just loading a profile with joy2key. So that error message stays up, retroarch loads,...and joy2key loads,...however it doesn't close. So should I ditch the additional apps and go with script? I noticed you had a bulk additional apps thing right? I'd rather do that if I could. Weird how joy2key integration is still eluding us, as this is a rather large quality of life feature. Edited Saturday at 08:14 PM by damageinc86 Quote
JoeViking245 Posted Saturday at 08:40 PM Posted Saturday at 08:40 PM 17 minutes ago, damageinc86 said: i get some error message Can you share a screenshot of the actual message? (vs just saying what it says. there may be more clues somewhere in the actual message and its window). Did you change the paths (on the Run line) to match your actual paths? Does you path(s) have spaces in it? If so, did you put quotes around it (as shown on the 1st path)? Are you using that exact script (with path changes)? Or did you modify it otherwise? If so, what does it look like? Note: With an Additional App, you need to add it to each game. vs. putting the above in the Running Script section of the emulator. Quote
damageinc86 Posted Saturday at 08:52 PM Posted Saturday at 08:52 PM (edited) I was just testing it out one game with the additional apps. Then id apply it to all if/when it worked. I followed the screenshots from someone else's old post https://forums.launchbox-app.com/topic/34014-joy2key-question/#comment-208307 Edited Saturday at 08:57 PM by damageinc86 Quote
JoeViking245 Posted Saturday at 09:32 PM Posted Saturday at 09:32 PM 28 minutes ago, damageinc86 said: I was just testing it out one game with the additional apps. Then id apply it to all if/when it worked. I followed the screenshots from someone else's old post Oh. OK. So you weren't even using the script you tagged me from. Or a script at all. (which is outside of the scope of the OP) That error message looks like maybe it came from joy2key itself. I've never used joy2key, so have no idea. My guess is you have something wrong in the command line parameters of your additional app, to get that error. And since your additional app only sets/loads the config, it's not designed to close itself when the game exits. Which was the intent of the OP and the need to use a script in the Running Script section (so as to close joy2key on game exit). Quote
damageinc86 Posted Saturday at 09:37 PM Posted Saturday at 09:37 PM (edited) Yeah, I figured you might just have knowledge about it. Since i seem to see you posting a lot in relation to things im searching for haha. Yeah, apparently that was their exact settings. But of course, when I do it, I get an error message haha story of my life. So perhaps just scripting is the way? vs. using additional apps? This one worked at loading it: https://forums.launchbox-app.com/topic/57658-joytokey-command-line/#findComment-365775 Edited Saturday at 10:14 PM by damageinc86 Quote
JoeViking245 Posted Saturday at 11:00 PM Posted Saturday at 11:00 PM 1 hour ago, damageinc86 said: Yeah, I figured you might just have knowledge about it. Since i seem to see you posting a lot in relation to things im searching for haha. Yeah, apparently that was their exact settings. But of course, when I do it, I get an error message haha story of my life. So perhaps just scripting is the way? vs. using additional apps? This one worked at loading it: https://forums.launchbox-app.com/topic/57658-joytokey-command-line/#findComment-365775 I only have enough knowledge to be dangerous. You can use an Additional App to load it. But you'll need to make another and set it to Run After Main Application that kills joy2key. Which is what lines 3 and 4 in the script does. Don't make it more difficult than it needs to be. Use the script that seemed to work for the OP. Quote
damageinc86 Posted Saturday at 11:08 PM Posted Saturday at 11:08 PM 6 minutes ago, JoeViking245 said: I only have enough knowledge to be dangerous. You can use an Additional App to load it. But you'll need to make another and set it to Run After Main Application that kills joy2key. Which is what lines 3 and 4 in the script does. Don't make it more difficult than it needs to be. Use the script that seemed to work for the OP. Yeah i found a .bat file in another thread as well. That worked for killing the joy2key window after successful loading and closing of emulator. It's all shaping up now! slowly but surely. Going to use your bulk additional apps too. We're going places! lol. Thanks. 1 Quote
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.