Jump to content
LaunchBox Community Forums

Recommended Posts

Posted (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 by Crabi
Posted
  On 2/18/2022 at 11:54 AM, Crabi said:

it works on running script but not on exit

Expand  

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

Posted
  On 2/18/2022 at 11:54 AM, 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 :)

Expand  

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 :

J2K.thumb.jpg.5aa04ed5a5f2f613f2a31ca39a05f832.jpg

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

Posted
  On 2/18/2022 at 12:50 PM, 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

Expand  

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 !

  On 2/18/2022 at 1:44 PM, 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 :

J2K.thumb.jpg.5aa04ed5a5f2f613f2a31ca39a05f832.jpg

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

Expand  

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 ?

  • Like 1
Posted

You can do it selecting all games with a plugin made by JoeViking245.

It's here on the forum  :)

 

 

GREETs

Posted
  On 2/18/2022 at 2:08 PM, Crabi said:

but retroarch do not exit now

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

Posted
  On 2/18/2022 at 2:37 PM, 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.

Expand  

Man i love you ! Thank you very much ! :)

  On 2/18/2022 at 2:18 PM, nohero said:

You can do it selecting all games with a plugin made by JoeViking245.

It's here on the forum  :)

 

 

GREETs

Expand  

Oh nice ! i'll maybe try it for other platforms it could help a lot !

Thank you for the advice :)

  • Game On 1
  • Crabi changed the title to [resolved] Joy2key ahk script

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