Jump to content
LaunchBox Community Forums

Auto Hotkey Scripts


Lordmonkus

Recommended Posts

Check your settings in Dolphin, it might be a setting in there causing the issue.  Check option/configuration/interface and uncheck Keep Window on Top and Confirm on Stop.  Those two options might be causing the issue you're seeing.  Here's a screenshot for where I mean, I also use the autohotkey you mentioned and have no issues.

image.thumb.png.bc80f1e1f837e32d86a263666bb8c885.png

Link to comment
Share on other sites

Hey there. I'm having an issue with "JoyToKey" within my autohotkey script. First off Im no expert at this, im just trying to get the program to run when I launch an emulator. Anyway, I was able to launch the JoyToKey, but that program ends up being front and center, while the emulator I loaded isnt even on the screen, only down in the pinned section of my Windows tabs....

This is the script I have running. I hope i have the exit routien for JoyToKey working too?

 

Run, C:\Users\MAME\Downloads\JoyToKey_en\JoyToKey.exe /m
$Esc::
{
        Run, C:\Users\MAME\Downloads\JoyToKey_en\JoyToKey.exe /C
	Process, Close, {{{StartupEXE}}}
}

 

Any help would be greatly appreciated!

Link to comment
Share on other sites

On 2/19/2018 at 2:30 PM, Charco said:

Here's a script to launch Yatagarasu Attack on Cataclysm in full screen from the launcher:

#SingleInstance force
Loop
while WinExist("YatagarasuLauncher")
{
Send, {Tab}{Enter}
ExitApp
}

Just point LaunchBox to the launcher and this script should do the trick.

Hi, how can i create a .bat with this?

Link to comment
Share on other sites

In your LaunchBox\AutoHotkey folder, right click and select New-> AutoHotkey Script. Open the created file with Notepad and paste the script into the file and save it.  Right click on the file and select Compile Script. Name the newly created file to whatever you wish, I named mine Full Screen, for example. Place that file in your Yatagarasu Attack on Cataclysm game folder.  

In LaunchBox, click edit on the game, choose YatagarasuLauncher.exe in the Launcher tab:

Yatagarasu.thumb.PNG.f0d793cdcf729feb41b7ff29d21e5178.PNGIn the Additional Apps tab, click Add Application and browse to your compiled AHK script exe:

826548777_AdditionalApp.thumb.PNG.98da5a23b88b716c814c7a0e6f45ab30.PNGEnsure the following settings are selected:

1903863495_AdditionalApp2.thumb.PNG.23a2ccf7f1474f5a68a8c9145f2acca8.PNG

  • Thanks 1
Link to comment
Share on other sites

7 hours ago, Charco said:

In your LaunchBox\AutoHotkey folder, right click and select New-> AutoHotkey Script. Open the created file with Notepad and paste the script into the file and save it.  Right click on the file and select Compile Script. Name the newly created file to whatever you wish, I named mine Full Screen, for example. Place that file in your Yatagarasu Attack on Cataclysm game folder.  

In LaunchBox, click edit on the game, choose YatagarasuLauncher.exe in the Launcher tab:

Yatagarasu.thumb.PNG.f0d793cdcf729feb41b7ff29d21e5178.PNGIn the Additional Apps tab, click Add Application and browse to your compiled AHK script exe:

826548777_AdditionalApp.thumb.PNG.98da5a23b88b716c814c7a0e6f45ab30.PNGEnsure the following settings are selected:

1903863495_AdditionalApp2.thumb.PNG.23a2ccf7f1474f5a68a8c9145f2acca8.PNG

Its weird my AHK says its something wrong in the line 7. Can you please share how its looks yours? Thanks by the way.

Link to comment
Share on other sites

Can someone please help me, i'm awful at auto hotkey scripts, i posted here over a week ago with no response. I'm trying to launch Joy2Key with certain emulators. But the problem im having is that Joy2key is opening first, then my launch emulator is 2nd and is not opened on m y desktop, i have to click the emulators icon in my bar below in order for it to be present. How can i make sure that emulator is opened and launched first, then Joy2key is launched 2nd and minimized? Please help, thanks!

Link to comment
Share on other sites

ok, so i used the script from ealier in this post to close the emulator with the esc key, but now how do i make that work in big box using a controller? 

the script i used is 
 

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


vk07sc000::
  Send, !{F4}
  Return


i added that in my edit emulator screen in launchbox for my mame emulator, but now in big box i would like to be able to close the game mame with my controller

Link to comment
Share on other sites

Please, can somebody look at my previous messages regarding JoyToKey?

 

Within the autohotkey script, I run JoyToKey, but when the emulator launches along with jtk, the emulator statrs of minimized.

 

I need a solution to this, because excuse I'm running jtk for the windows build of DeSmuLe, and Xroar.

 

Please, what am  i missing?

Link to comment
Share on other sites

19 hours ago, CDBlue said:

you need to make sure controller automation is enabled in both bigbox and launchbox, and keys assigned for actions accordingly.  They both have separate settings, so you need to set them up in both apps.

i set it up in LB and in BB but my button combo does nothing when im running mame.....

 

Link to comment
Share on other sites

the button combo doesn't work in MAME as it doesn't accept simulated keyboard presses it is however very easy to set your own button combo inside of MAME just load a game go to the tab menu then into Input general, User interface and assign a combo to UI cancel.

Link to comment
Share on other sites

On 10/15/2018 at 3:17 PM, infidelity said:

Please, can somebody look at my previous messages regarding JoyToKey?

 

Within the autohotkey script, I run JoyToKey, but when the emulator launches along with jtk, the emulator statrs of minimized.

 

I need a solution to this, because excuse I'm running jtk for the windows build of DeSmuLe, and Xroar.

 

Please, what am  i missing?

I dont use jtk but a quick google says that jtk has "start joytokey in minimised mode". Try enabling that first.

And remove the /m from this line.

On 10/5/2018 at 1:41 AM, infidelity said:

Run, C:\Users\MAME\Downloads\JoyToKey_en\JoyToKey.exe /m

 

Have you tried googling the issue. 

What about creating a shortcut to jtk, right click shortcut, shortcut tab, run... select minimised. Then use:

Run, C:\Users\MAME\Downloads\JoyToKey_en\JoyToKey.exe.lnk

If nothing works... solving something like this with ahk can be a pain in the ass. 

Here's a few scripts to try...

SetTitleMatchMode, 2

Run, C:\Users\MAME\Downloads\JoyToKey_en\JoyToKey.exe

loop
{
	if WinExist("MAME")
	{
		WinMaximize, MAME
		return
	}
}

$Esc::
{
        Run, C:\Users\MAME\Downloads\JoyToKey_en\JoyToKey.exe /C
	Process, Close, {{{StartupEXE}}}
}

Inside the loop you see "MAME" twice. You may need to change this, I dont use mame so im not sure if "MAME" will work, it needs to be a word that is in mame's window title. To find the window title, start mame, minimise it, hover over the mame icon on taskbar, your get the little window popup with the window title. I assume it will include the word mame. This script is case sensitive so make sure to get upper and lower case correct.

 

SetTitleMatchMode, 2

Run, C:\Users\MAME\Downloads\JoyToKey_en\JoyToKey.exe

loop
{
	if WinExist("MAME")
	{
		WinRestore, MAME
		return
	}
}

$Esc::
{
        Run, C:\Users\MAME\Downloads\JoyToKey_en\JoyToKey.exe /C
	Process, Close, {{{StartupEXE}}}
}

 

SetTitleMatchMode, 2

Run, C:\Users\MAME\Downloads\JoyToKey_en\JoyToKey.exe

loop
{
	if WinExist("MAME")
	{
		WinActivate, MAME
		return
	}
}

$Esc::
{
        Run, C:\Users\MAME\Downloads\JoyToKey_en\JoyToKey.exe /C
	Process, Close, {{{StartupEXE}}}
}

 

SetTitleMatchMode, 2

Run, C:\Users\MAME\Downloads\JoyToKey_en\JoyToKey.exe

loop
{
	if WinExist("MAME")
	{
		PostMessage, 0x112, 0xF030,,, MAME
		return
	}
}

$Esc::
{
        Run, C:\Users\MAME\Downloads\JoyToKey_en\JoyToKey.exe /C
	Process, Close, {{{StartupEXE}}}
}

 

 

 

And iv just read your post saying your trying to use this with Desmule and xroar. I cant be bothered to change all the times iv said mame in this post. So in the scripts swap out the word mame for whatever word is in the window title for desmule and xroar.

Edited by jayjay
Link to comment
Share on other sites

  • 2 weeks later...
18 minutes ago, natehiggers said:

Anybody knows a script that would press F3 as soon as Demul starts? I managed to get it to fullscreen, only thing lacking is having the menu bar removed automatically from the start

Maybe something like this?

 

sleep, 2000

send {F3}

 

Link to comment
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
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...