Jump to content
LaunchBox Community Forums
Lordmonkus

Auto Hotkey Scripts

Recommended Posts

@Solo I believe there's another thread on this forum (if you do a search) as a lot of people have asked how to use Phoenix, since it's considered to be not only the best 3DO emulator but the Atari Jaguar as well surprisingly. But I believe you have to create a profile for each individual game you have within the emulator itself before you can run them through launchbox. However if there's a more simple way, i'd definitely like to know tooūüėĀ

Share this post


Link to post
Share on other sites
1 minute ago, bundangdon said:

@Solo I believe there's another thread on this forum (if you do a search) as a lot of people have asked how to use Phoenix, since it's considered to be not only the best 3DO emulator but the Atari Jaguar as well surprisingly. But I believe you have to create a profile for each individual game you have within the emulator itself before you can run them through launchbox. However if there's a more simple way, i'd definitely like to know tooūüėĀ

I have created a profile for all games within the emulator, the way is that how we should be able to load em, AHK would be the easiest way.

Share this post


Link to post
Share on other sites

Hi everyone, i am in need for a script.

My Cemu setup is almost complete, the second gamepad windowof cemu is configured to launch on the second monitor of my pc and all I need is a auto hotkey script for the mouse cursor to move to the second screen, click into the gamepad window of cemu so that it can be put into fullscreen mode by pressing alt+enter. Doing it manually works fine, I am just too inexperienced to write my own script.

Aside from my problem, I am using this setup to use my android tablet (which is configured as second monitor via wlan streaming) as touch controller for cemu, not sure if anyone else has done this, but it works pretty well. At least I have not found anything similar while searching.

Thank you in advance, I hope someone is able to help me.

Share this post


Link to post
Share on other sites

To "click on the gamepad window" (set focus), are you able to press Alt+Tab (vs having to move the mouse cursor and click)  ...and then press Alt+Enter...?

Share this post


Link to post
Share on other sites
On 3/13/2019 at 2:58 AM, bundangdon said:

@Solo I believe there's another thread on this forum (if you do a search) as a lot of people have asked how to use Phoenix, since it's considered to be not only the best 3DO emulator but the Atari Jaguar as well surprisingly. But I believe you have to create a profile for each individual game you have within the emulator itself before you can run them through launchbox. However if there's a more simple way, i'd definitely like to know tooūüėĀ

I ended up using a slimmed version of RocketLauncher so that I can launch games of Launchbox with Phoenix, Zomb is going to take a look at this soon as he has time.

  • Thanks 1

Share this post


Link to post
Share on other sites
On 3/14/2019 at 4:46 PM, Solo said:

I ended up using a slimmed version of RocketLauncher so that I can launch games of Launchbox with Phoenix, Zomb is going to take a look at this soon as he has time.

Any update on this?  Would love to get Phoenix integrated into launchbox.

Share this post


Link to post
Share on other sites
14 minutes ago, d8thstar said:

Any update on this?  Would love to get Phoenix integrated into launchbox.

So many steps in order to do this, that I skipped making the guide.

Share this post


Link to post
Share on other sites

For bsnes V107.1

If the menu bar shows up at the top of the screen after the emulator starts, and it is not a true fullscreen experience do the following:

Edit the emulator and remove --fullscreen from default command line parameters and if you have default command line parameters in the associated platforms tab remove it from there also.

Then go over to the autohotkey script tab and drop the following at the the top:

#NoEnv

WinWaitActive , bsnes
Sleep, 1000  ;1000 = 1 second
SetKeyDelay, -1, 110
Send {F11}
Return

Worked like a charm for me!

Took me awhile to figure this out, but for some reason the --fullscreen was causing issues for me, once I removed it, the script worked. 

Be sure to leave 

$Esc::
{
    Process, Close, {{{StartupEXE}}}
}

So you can exit the emulator.

Oh and F11 is the default fullscreen hotkey for bsnes.  If you choose a different key then you will need to change the {F11} in the autohotkey script to whichever one you are using.

  • Thanks 1

Share this post


Link to post
Share on other sites

Hey Gang.  Forgive me if I've missed this information, but what command can I use to exit out of TechnoParrot?  Nothing I've tried seems to work.  Thanks in advance.

Share this post


Link to post
Share on other sites

Hey guys, 

I recently started using super resolutions for my arcade CRT monitor, and it works great with GroovyMame, but with Retroarch when I load a game the resolution changes as expected, however when I close Retroarch the resolution doesn't go back to my normal desktop resolution of 640x480. 

I found a program that can change the resolution via command line and I have a batch file that calls it and it works.  So what I would like to do is have the batch file run when retroarch closes.  

I'm currently trying this method and I think I'm close, but so far it's not working:

Within my retroarch emulator settings under the Autohotkey tab I have this:

SetWorkingDir %A_ScriptDir%
run, Autohotkey.exe "retrochange.ahk"

And my ahk looks like this:

#SingleInstance, Force
#Persistent

loop
{
Process, Exist, retroarch.exe
pid1 := ErrorLevel
If (!pid1)
         {
      continue
         }
      else
         {
          Goto Next
         }
}

Next:
loop
{
Process, Exist, retroarch.exe
pid1 := ErrorLevel
If (!pid1)
         {
         Run G:\LaunchBox\changeres.bat
         ExitApp
         }
}
Return

The ahk is located in the Launchbox/metadata/Temp folder

What am I missing, or is there an easier/better way to run my batch file when Retroarch closes?

Share this post


Link to post
Share on other sites

I fixed it:

G:\LaunchBox\changeres.bat 

needed to be in quotes like this

Run "G:\LaunchBox\changeres.batÔĽŅ"
  • Like 1

Share this post


Link to post
Share on other sites

Well, I take that back, It was all working and now for some reason it wont load anymore.  Now I'm really lost.

Share this post


Link to post
Share on other sites

Just shooting from the hip...

Since you're launching retrochange each time you start an RA emu game, how about putting this in the RA emulator under the AHK tab...

#SingleInstance, Force
#Persistent

Sleep, 3000  	;give RA a few seconds to load
Process, WaitClose, retroarch.exe
Run, "G:\LaunchBox\changeres.bat"
ExitApp

Another thought would be under the games' Additional Apps, add g:\LaunchBox\changeres.bat and have it run "Automatically Run After Main Application".

  • Thanks 1

Share this post


Link to post
Share on other sites
Posted (edited)
15 hours ago, JoeViking245 said:

Just shooting from the hip...

Since you're launching retrochange each time you start an RA emu game, how about putting this in the RA emulator under the AHK tab...


#SingleInstance, Force
#Persistent

Sleep, 3000  	;give RA a few seconds to load
Process, WaitClose, retroarch.exe
Run, "G:\LaunchBox\changeres.bat"
ExitApp

Another thought would be under the games' Additional Apps, add g:\LaunchBox\changeres.bat and have it run "Automatically Run After Main Application".

I ended up getting to work by installing AutoHotKey as a standalone application, and using this to call the AHK on exit:

{
Run, G:\Launchbox\AutoHotkey\retrochange.ahk
}

So glad that's finally done, now I can move on with sorting my collection. 

Edited by Arcanthur
typo

Share this post


Link to post
Share on other sites

Hey guys, has anyone had any luck with being able to exit out of Citra or Cxbx Reloaded with AHK scripts? For a long time this script worked:

$Esc::
{
    Process, Close, {{{StartupEXE}}}
}

But now neither one properly exits. I'm not sure if it's secondary to updates to LB or the emulators themselves.

Share this post


Link to post
Share on other sites
On 5/30/2019 at 1:38 PM, TheNewClassics said:

Hey guys, has anyone had any luck with being able to exit out of Citra or Cxbx Reloaded with AHK scripts? For a long time this script worked:

$Esc::
{
    Process, Close, {{{StartupEXE}}}
}

But now neither one properly exits. I'm not sure if it's secondary to updates to LB or the emulators themselves.

I just updated Citra and tested with current version of Launchbox and I can exit fine. I do use a different AHK though. Try this one, it is a cleaner way to close out of the emulator. 

Esc::
SetTitleMatchMode, 2
WinWaitActive, Citra
Send !{f4}

 

Share this post


Link to post
Share on other sites

Where do you place that script? Is it under the "Exit Autohotkey" spot? It's not working for me, it just essentially freezes the emulator. 

Share this post


Link to post
Share on other sites
20 minutes ago, TheNewClassics said:

Where do you place that script? Is it under the "Exit Autohotkey" spot? It's not working for me, it just essentially freezes the emulator. 

Put it in the Running AHK tab. 

Try this one. 

$ESC::WinClose, ahk_exe citra-qt.exe

 

Share this post


Link to post
Share on other sites

Same issue unfortunately. What I've noticed is that I need to press Esc twice, and then the emu exits properly (though this only works with the keyboard). I can't figure out why that is tho. The first one just seems to freeze the emu, and then I have to alt tab back to the GUI screen. 

Share this post


Link to post
Share on other sites
16 minutes ago, TheNewClassics said:

Same issue unfortunately. What I've noticed is that I need to press Esc twice, and then the emu exits properly (though this only works with the keyboard). I can't figure out why that is tho. The first one just seems to freeze the emu, and then I have to alt tab back to the GUI screen. 

Not sure. Works fine for me. Alt+F4 will close Citra. Try something simple like. Just tested and that works as well. 

ESC::send !{F4}

 

Screen Shot 2019-05-31 at 2.22.44 PM.png

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

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