Help Autohotkey
4 posters
Page 1 of 1
Help Autohotkey
Help, is possible to run "Autohotkey.exe" after run emulator(in es_settings.cfg) . I need for exit with controller some emulator (like....cxbx-reloaded). Thanks.
LUXBUIO- Messages : 20
Date d'inscription : 2020-05-24
Re: Help Autohotkey
Hello,
If you want to do this you need to create your own scripts. EmulationStation support some keywords as folders to launch scripts. For example, create a folder "game-start" in scripts folder of ES and place scripts (such *.bat files) inside if you want your script to be launched when a game start. You can also create a folder "game-end" to launch scripts when you exit a game.
If you want to do this you need to create your own scripts. EmulationStation support some keywords as folders to launch scripts. For example, create a folder "game-start" in scripts folder of ES and place scripts (such *.bat files) inside if you want your script to be launched when a game start. You can also create a folder "game-end" to launch scripts when you exit a game.
Re: Help Autohotkey
Good evening to all.
Or you can start the script when you start emulation station. If you are on windows, you can run a script that, when you press a certain joystick button will send escape (or whatever key closes it) to the running emulator. If you're not running multiple emulators at the same time you can have the script sending multiple key to multiple emulators, only the one that runs at the moment will pick it up. I have it set up like this. I even have a "panic button", in case some emulator hangs (on windows it happens quite often), that way I can control everything with the joystick. I prefer autohotkey exes instead of a bat, that way I can have it running in the background.
Or you can start the script when you start emulation station. If you are on windows, you can run a script that, when you press a certain joystick button will send escape (or whatever key closes it) to the running emulator. If you're not running multiple emulators at the same time you can have the script sending multiple key to multiple emulators, only the one that runs at the moment will pick it up. I have it set up like this. I even have a "panic button", in case some emulator hangs (on windows it happens quite often), that way I can control everything with the joystick. I prefer autohotkey exes instead of a bat, that way I can have it running in the background.
Gigi1985- Messages : 6
Date d'inscription : 2020-05-20
Re: Help Autohotkey
Thanks, let me explain better.
I have "Cemu" and "cxbx-reloaded" that not exit with "controller combo".
I have create 2 AutoHotkey.ahk, 1 for Cemu, and, 1 for "cxbx-reloaded", i need that before start emulators - start the appropriate AutoHotkey.ahk.
Becouse the AutoHotkey.ahk that i have created when i use "controller combo", close the emulator and AutoHotkey.exe.
The code of .ahk is follow:
---------------------------------------------
~Joy8::
if (GetKeyState("Joy7","P")=1)
{
Process, Close, Cemu.exe
}
#If WinActive("AutoHotkey.exe")
Esc::
Winclose
ExitApp
---------------------------------------------
for cxbx-reloaded "Process, Close, cxbx.exe".
How can I solve it? Thank you.
I have "Cemu" and "cxbx-reloaded" that not exit with "controller combo".
I have create 2 AutoHotkey.ahk, 1 for Cemu, and, 1 for "cxbx-reloaded", i need that before start emulators - start the appropriate AutoHotkey.ahk.
Becouse the AutoHotkey.ahk that i have created when i use "controller combo", close the emulator and AutoHotkey.exe.
The code of .ahk is follow:
---------------------------------------------
~Joy8::
if (GetKeyState("Joy7","P")=1)
{
Process, Close, Cemu.exe
}
#If WinActive("AutoHotkey.exe")
Esc::
Winclose
ExitApp
---------------------------------------------
for cxbx-reloaded "Process, Close, cxbx.exe".
How can I solve it? Thank you.
LUXBUIO- Messages : 20
Date d'inscription : 2020-05-24
Re: Help Autohotkey
please, choose an avatar...
-------------- Please -------------
The board rules: https://retrobat.forumgaming.fr/t51-read-befor-posting-retrobat-forum-rules
BEFORE POSTING !!!!
READ:
English FAQ: https://retrobat.forumgaming.fr/t135-faq-retrobat-wip
French FAQ: https://retrobat.forumgaming.fr/t136-faq-retrobat-wip
Spanish FAQ: https://retrobat.forumgaming.fr/t854-faq-retrobat-wip
Retrobat Wiki (english & french): https://wiki.retrobat.org/
and:
Choose an avatar: https://retrobat.forumgaming.fr/t1190-avatar-how-to-choose-an-avatar-on-the-forum
and say "Hello"
Lorenzolamas- Admin
- Messages : 2544
Date d'inscription : 2019-07-28
Re: Help Autohotkey
Why two? You can have them all in one.
I have my batch like this (as far as i can remember):
#singleinstance, force
#notrayicon
Joy10:: ;thats the start button that executes the command
if GetKeYState ("Joy9") ;you have to hold the select button first (like in retroarch, when you hold select and press start to exit)
{
Sleep 1000 ;so that it doesnt execute instantly
Send, , {esc}, pcsx2.exe ;sends esc key to pscx2 emulator
Send, , {esc}, dolphin.exe ;sends esc key to dolphin.exe
Send, , {whateverkey}, whatever_emulator.exe
}
return
Joy5:: ; L1 ; some sort of panic button, presing L1+L2+L3+R1+R2+R3 at the same time will force close all listed emulators
Joy6:: ; R1
Joy7:: ; L2
Joy8:: ; R2
Joy11:: ;L3
Joy12:: ;R3
if getkeystate ("Joy5")
if getkeystate ("Joy6")
if getkeystate ("Joy7")
if getkeystate ("Joy8")
if getkeystate ("Joy11")
if getkeystate ("Joy12")
{
Sleep 1000
process, close, pcsx2.exe
process, close, retroarch.exe
process, close, dolphin.exe
process, close, wathever_emulator.exe
}
return
You can use "ifwinexists", "ifwinactive", that way you can send keys to specific emulator!
I have my batch like this (as far as i can remember):
#singleinstance, force
#notrayicon
Joy10:: ;thats the start button that executes the command
if GetKeYState ("Joy9") ;you have to hold the select button first (like in retroarch, when you hold select and press start to exit)
{
Sleep 1000 ;so that it doesnt execute instantly
Send, , {esc}, pcsx2.exe ;sends esc key to pscx2 emulator
Send, , {esc}, dolphin.exe ;sends esc key to dolphin.exe
Send, , {whateverkey}, whatever_emulator.exe
}
return
Joy5:: ; L1 ; some sort of panic button, presing L1+L2+L3+R1+R2+R3 at the same time will force close all listed emulators
Joy6:: ; R1
Joy7:: ; L2
Joy8:: ; R2
Joy11:: ;L3
Joy12:: ;R3
if getkeystate ("Joy5")
if getkeystate ("Joy6")
if getkeystate ("Joy7")
if getkeystate ("Joy8")
if getkeystate ("Joy11")
if getkeystate ("Joy12")
{
Sleep 1000
process, close, pcsx2.exe
process, close, retroarch.exe
process, close, dolphin.exe
process, close, wathever_emulator.exe
}
return
You can use "ifwinexists", "ifwinactive", that way you can send keys to specific emulator!
Gigi1985- Messages : 6
Date d'inscription : 2020-05-20
Re: Help Autohotkey
Thanks, i don't think.....one for all, that start with Retrobat and close with Retrobat.
LUXBUIO- Messages : 20
Date d'inscription : 2020-05-24
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|