Jump to content
LaunchBox Community Forums

[resolved] Joy2key ahk script


Crabi

Recommended Posts

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
Link to comment
Share on other sites

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 :

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

Link to comment
Share on other sites

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 :

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

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
Link to comment
Share on other sites

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 :)

  • Game On 1
Link to comment
Share on other sites

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