Jump to content
LaunchBox Community Forums

Auto Hotkey Scripts


Lordmonkus

Recommended Posts

10 hours ago, Your Friendly A.I Overlord said:

f you use the duckstation-qt version you can add the command-line parameter:

-batch

to LaunchBox. Then you don't need a script whatsoever for exiting duckstation-qt.

Fantastic! This is a much cleaner solution than using a script. The -resume and -batch arguments work great to automate loading the latest save game and to exit Duckstation once the emulation ends. I like to make everything work seamlessly

  • Like 1
Link to comment
Share on other sites

  • 5 weeks later...
1 hour ago, Cnells2000 said:

Hello Guys Im using @Cupanther Custom startup theme and its great! But now i have to rename all the images to each game. Is there a batcher that i can use to rename hundreds of images to a specific game name in each rom folder?

heres an example of what i mean:

 

 

Untitled-3.jpg

Why are you using the same image and renaming it for all games? His Startup theme was made to show platform specific and/or game specific control image. So you would just need to have an NES platform named image and it would show the same image for any game launched for NES platform. 

  • Thanks 1
Link to comment
Share on other sites

3 hours ago, Retro808 said:

Why are you using the same image and renaming it for all games? His Startup theme was made to show platform specific and/or game specific control image. So you would just need to have an NES platform named image and it would show the same image for any game launched for NES platform. 

Ok So I Make Folder Structure Platform/Nintendo NES/image.jpg?

Link to comment
Share on other sites

17 hours ago, Cnells2000 said:

Ok So I Make Folder Structure Platform/Nintendo NES/image.jpg?

I have not looked specfically at what folder structure that theme uses but there is likely an image folder in the theme. So look there and it is most likely something akin to:

StartupThemes\Custom Startup Image\Images\Platforms\[your exact platform name].jpg

I do see in the theme’s thread the creator mentions how to file images is in the ReadMe.txt file. So I would look there. 

  • Thanks 1
Link to comment
Share on other sites

All platform specific startup images must be named as the platform in your set-up is named and placed in the \LaunchBox\Images\Custom Startup Images folder 

(Example: \LaunchBox\Images\Custom Startup Images\Arcade.png)

Note: The name must match how you have the platform named in LaunchBox. 

  • Thanks 1
Link to comment
Share on other sites

On 5/8/2022 at 5:23 PM, Cupanther said:

All platform specific startup images must be named as the platform in your set-up is named and placed in the \LaunchBox\Images\Custom Startup Images folder 

(Example: \LaunchBox\Images\Custom Startup Images\Arcade.png)

Note: The name must match how you have the platform named in LaunchBox. 

There It Is! Thank You Guys

Link to comment
Share on other sites

  • 2 weeks later...

Good Afternoon, I have been trying to figure out an AHK combination that will toggle Mame HLSL from the arcade controls.  Pressing LCtrl+LAlt+F5 on the keyboard itself works.  I have tried all of the following combinations with AHK to send these commands by pressing the C key on my control panel, but none have produced a result.  Any thoughts would be greatly appreciated.  Thanks.

Attempt #1 - c:: Send {LCtrl}{LAlt}{f5}

Attempt #2 - c:: Send {LCtrl Down}{LAlt Down}{f5 Down} {LCtrl Up}{LAlt Up}{f5 Up}

Attempt #3 - c::Send {LCtrl down}{LAlt down}{F5 down}

                        c Up::Send {LCtrl up}{LAlt up}{F5 up}

  • Like 1
Link to comment
Share on other sites

1 hour ago, garrett521 said:

Good Afternoon, I have been trying to figure out an AHK combination that will toggle Mame HLSL from the arcade controls.  Pressing LCtrl+LAlt+F5 on the keyboard itself works.  I have tried all of the following combinations with AHK to send these commands by pressing the C key on my control panel, but none have produced a result.  Any thoughts would be greatly appreciated.  Thanks.

Attempt #1 - c:: Send {LCtrl}{LAlt}{f5}

Attempt #2 - c:: Send {LCtrl Down}{LAlt Down}{f5 Down} {LCtrl Up}{LAlt Up}{f5 Up}

Attempt #3 - c::Send {LCtrl down}{LAlt down}{F5 down}

                        c Up::Send {LCtrl up}{LAlt up}{F5 up}

Try adding a SetKeyDelay in there.

SetKeyDelay, 0, 50
Send ^!{F5}

 

Link to comment
Share on other sites

17 hours ago, JoeViking245 said:

Try adding a SetKeyDelay in there.

SetKeyDelay, 0, 50
Send ^!{F5}

 

Thank you.  After doing some more research, it looks like this issue is less of an AHK command issue, and more that Mame does not like working with AHK.  I see that some have had success with changing their Mame.ini to dinput, but not sure how that will affect me being able to use my trackball, spinner, lightgun, analog joystick, and gamepads.

Link to comment
Share on other sites

5 hours ago, garrett521 said:

Mame does not like working with AHK

It can work when setting the SetKeyDelay.  Did you try it?  You may need to adjust the "50" a bit.  I didn't test this particular sequence. 

 

Edit:  @garrett521 Did some testing and now remember why I don't do any AHK stuff for MAME. lol

So Plan "B" (which in retrospect, should have been Plan "A" all along)...  Change the default Toggle keys in MAME to "c".

image.thumb.png.514b83605c55b09fa580a9349c4810fa.png

(Input General - User Interface - very last entry)

Edited by JoeViking245
Link to comment
Share on other sites

2 hours ago, JoeViking245 said:

It can work when setting the SetKeyDelay.  Did you try it?  You may need to adjust the "50" a bit.  I didn't test this particular sequence. 

 

Edit:  @garrett521 Did some testing and now remember why I don't do any AHK stuff for MAME. lol

So Plan "B" (which in retrospect, should have been Plan "A" all along)...  Change the default Toggle keys in MAME to "c".

image.thumb.png.514b83605c55b09fa580a9349c4810fa.png

(Input General - User Interface - very last entry)

Yes!  This is such a better option!  Thank you for this, as I had not idea we could change these multiple key combinations directly.  Do you have any idea where these keyboard commands are kept within the Mame files themselves?  I did not see them in any of the .ini files.  They are probably buried inside an unreadable file, but figured I'd ask.  Thank you so much for this.

Link to comment
Share on other sites

1 hour ago, garrett521 said:

Yes!  This is such a better option!  Thank you for this, as I had not idea we could change these multiple key combinations directly.  Do you have any idea where these keyboard commands are kept within the Mame files themselves?  I did not see them in any of the .ini files.  They are probably buried inside an unreadable file, but figured I'd ask.  Thank you so much for this.

You're welcome.  Just wished I'd thought of that earlier. ;)

../cfg/default.cfg

Link to comment
Share on other sites

9 minutes ago, Retro808 said:

@The Papaw This is better served as a specific post in the 3rd party applications and plug-ins subforum and not in the AHK Scripts help thread.

Please create a new thread there for this. I will remove this one after you do. Thanks.

np, thought a AHK script would go in the AHK thread...deleted it, sorry 'bout that

Edited by The Papaw
Link to comment
Share on other sites

Hi guys.

Please don't mock me too much, but I am struggling to get just a simple macro-like setting working that will allow me to turn the windows volume up/down when holding down either the left Alt_b key or Left Alt+n keys.

I have built a total mutant mini arcade machine out of what was originally a Picade and fitted an Arduino-based Stereo amp in to it, but it is for my young daughter and I want her to have an easy way to control the volume as the Emulators vary with their levels so much. Using Redream as an example, this is the "Running Script", the volume settings do nothing - 

 

; This Section allows volume up and down macro

<^b::
send {Volume_Up 5}
<^n::
send {Volume_Down 5}
return

; This section closes Redream when pressing Escape
$Esc::
{
	Send {Alt down}
	Sleep 50
	Send {F4 down}
	Sleep 50
	Send {F4 up}
	Sleep 50
	Send {Alt up}
}

If someone could help this tired old n00b, I would really appreciate it. Thanks, Nick :)

Link to comment
Share on other sites

1 hour ago, C-Beats said:

@Mr Footlong If you have a premium license you can set up automation bindings up to do this for you already without the need for AHK at all.

Thanks, (I have a lifetime license) I saw the mapping option for gamepads, but not specifically for keyboard input, unless I am missing something else? I need it so that pressing the combo alt+b or alt+n which are mapped to the coin (select) and left/right shoulder buttons on the main Picade cab, turn the volume up or down without control pads being used, thanks :)

283732594_10160403439794287_2256537554788141015_n.jpg

283486253_10160403439669287_4021496063612219377_n.jpg

  • Game On 1
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...