Jump to content
LaunchBox Community Forums

DeSmuMe Pause menu save/load scripts


Stevie Mac

Recommended Posts

Can someone tell me how to get the pause menu to work with the standalone DeSmuMe?
When you first have it setup nothing is shown in the pause menu so I need the scripts for this to work in the LB Save State Restart etc parts I think but I can't figure them out.
Quick save = I
Quick Load = P
Reset = Ctrl+R

Thanks

Link to comment
Share on other sites

You can use send commands. the lower case letters are intentional. if you use a capital letter in a send command you imply just that, which means also holding the shift key which will likely make these hotkeys not work. I did not test these with the emulator, fingers crossed they work for you!

 

Send i

Send p

Send {LCtrl down}{r down}{r up}{LCtrl up}

Link to comment
Share on other sites

5 hours ago, Stevie Mac said:

Does the 'Send i' not need a bracket 'Send (i)'?

It is not needed. I know I didn't test it out with the emulator (I don't have it anymore), but on that bit I would say "trust me bro" (I know that sounds reassuring 🙄 lol) that is just obeying proper syntax so I'm confident that is correct.

 

If you want a detailed explanation, read the spoiler bit below

Spoiler

 In this case it doesn't matter what the UI shows. you need to simulate what you actually press if it was done physically. you don't press SHIFT + I or SHIFT + P you instead press the letter key by itself, that means you should send a lowercase letter. It might work with uppercase, or it might not. depends on how the program interprets the hotkey, how finicky is it, does it accept both lower and upper case for ex.

 

'Send (i)' is using parenthesis ( ) rather than brackets [ ].  and these are braces { }. That would type out literal text "(i)" but you don't press those keys sequentially* to trigger the hotkey, so, don't do that. *(note that presses them sequentially rather than pressing them all together simultaneously. that's why the reset hotkey needs keys to be held down)

but in sense of all roads lead to Rome, there are other ways to do it with different syntax too, for ex

Send ^r

the above means Ctrl + r and by theory works the same as the first method I shared

 

to drive this point home to the finish line here is a real world example. Saving hotkey in Notepad is Ctrl + S. but, if I try to send a capital/uppercase letter with AHK it will not work.

This for example will NOT work to use save in Notepad

Send ^S

Or, to be technical, it does try to save, but it's going to use SAVE AS because the hotkey for SAVE AS is Ctrl + SHIFT + S and using the capital S implies also sending a shift key even though it isn't explicitly written in the line. You would instead need to use this with a lower case s to use the standard save

Send ^s

 


 

Link to comment
Share on other sites

By the way I know it states 'I' as in Shift I for a capital letter but even if I re type the letter as lower case it still show I not i
If I press 'Shift + I' in the emu it does nothing where as just 'i' does save to quick slot 0 

Link to comment
Share on other sites

Just now, Stevie Mac said:

By the way I know it states 'I' as in Shift I for a capital letter but even if I re type the letter as lower case it still show I not i
If I press 'Shift + I' in the emu it does nothing where as just 'i' does save to quick slot 0 

good, that at least reassures you gave correct info on how the hotkey works and proves you need to only send the lowercase letter

not every program will properly interpret the keys being sent from AHK and since I didn't test it I put that out there that it might not work....here we are lol. likely needs to either have window focus or use a different send type, input is being eaten by another program, who knows at this point. I'd have to fart around with the emulator to give you more advice but I'm in no place with free time to provide more help like that.

I can give some trouble shooting advice though. Put this in a text file and save it as something like "HotkeyTest.ahk"

SetKeyDelay, 0, 50

F12::
Send i
Return

F11::
Send p
Return

Then double click the file to run the script. pushing F12 will try to send the save command, F11 will try to do the load. Now make sure the emulator is the active window, and try using those AHK hotkeys, to trigger the emulator's hotkeys. Any luck doing that?

 

 

1 minute ago, JoeViking245 said:

That's the right spot.  Add a line above that and put "SetKeyDelay, 0, 50" (without quotes).  Not tested, but "looks good on paper".

SetKeyDelay, 0, 50
Send i

 

thanks Joe, that's another good idea. I stuck it in the above example too

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