jmirage Posted April 7, 2023 Share Posted April 7, 2023 Sorry if this is already available somewhere else, but is there any reference to which other variables we can use in AutoHotKey scripts? Or is it only {{StartupEXE}} ? Quote Link to comment Share on other sites More sharing options...
JoeViking245 Posted April 7, 2023 Share Posted April 7, 2023 3 hours ago, jmirage said: Sorry if this is already available somewhere else, but is there any reference to which other variables we can use in AutoHotKey scripts? Or is it only {{StartupEXE}} ? For Running Scripts (and Additional Apps), you can't pass any variables to them. But for Command-Line Parameters.... In addition to those listed, there's also %romlocation% (added in v12.7). 1 Quote Link to comment Share on other sites More sharing options...
jmirage Posted April 10, 2023 Share Posted April 10, 2023 On 4/7/2023 at 2:25 PM, JoeViking245 said: For Running Scripts (and Additional Apps), you can't pass any variables to them. But for Command-Line Parameters.... In addition to those listed, there's also %romlocation% (added in v12.7). thanks a lot! reading a bit more about this, actually what I can use is Adittional Apps that are triggered before the game. This is because I'm playing Sekiro on both the Steam Deck and PC and sadly From Software syncs the graphic settings, not only the save game as they should. I'm planning on fixing this by modifying the settings before and after triggering the game on PC 1 Quote Link to comment Share on other sites More sharing options...
MCF Posted April 26, 2023 Share Posted April 26, 2023 Not sure if this was posted, but I couldn't find this in this topic I am having problems enabling mouse in SNES9X I have -port1 mouse1 added as a parameter to the emulator, but I find that it still requires my pressing 7 to actually enable it in SNES9X I tried the following AHKs in the Running Scripts section, to no avail SendInput {vk47} Send, 7 Send 7 Send {7} SendInput, {7} SendInput, {Raw}7 Any help is greatly appreciated. Quote Link to comment Share on other sites More sharing options...
JoeViking245 Posted April 26, 2023 Share Posted April 26, 2023 1 hour ago, MCF said: Not sure if this was posted, but I couldn't find this in this topic I am having problems enabling mouse in SNES9X I have -port1 mouse1 added as a parameter to the emulator, but I find that it still requires my pressing 7 to actually enable it in SNES9X I tried the following AHKs in the Running Scripts section, to no avail SendInput {vk47} Send, 7 Send 7 Send {7} SendInput, {7} SendInput, {Raw}7 Any help is greatly appreciated. I've never used SNES9x. Does the Use Mouse not work? Regardless, if you find you still need to press 7 to switch controllers, you may try adding a SetKeyDelay. You'll also need to add a delay/pause/wait because the running script executes right away. You want to wait a little for the emulator to actually be running before "pressing 7". Sleep, 5000 SetKeyDelay, 125, 50 Send, 7 "5000" = 5 seconds. Adjust accordingly depending on how long it takes for the emulator to be fully loaded. Quote Link to comment Share on other sites More sharing options...
MCF Posted April 26, 2023 Share Posted April 26, 2023 40 minutes ago, JoeViking245 said: I've never used SNES9x. Does the Use Mouse not work? Regardless, if you find you still need to press 7 to switch controllers, you may try adding a SetKeyDelay. You'll also need to add a delay/pause/wait because the running script executes right away. You want to wait a little for the emulator to actually be running before "pressing 7". Sleep, 5000 SetKeyDelay, 125, 50 Send, 7 "5000" = 5 seconds. Adjust accordingly depending on how long it takes for the emulator to be fully loaded. I want to eventually use BigBox and not require using keyboard and mouse Unfortunately the suggested AHK did not work... I had set a variation of Sleep, even delaying up to 20 seconds did not work This is different from the KEGA Fusion emulator (which I use to emulate Sega Master System games), and the following AHK to send F12 works Sleep 5000 Send {F12} Quote Link to comment Share on other sites More sharing options...
JoeViking245 Posted April 26, 2023 Share Posted April 26, 2023 18 minutes ago, MCF said: Unfortunately the suggested AHK did not work Download and tested a game and the following worked for me. WinWaitActive ahk_exe snes9x-x64.exe send 7 This assumes your executable is "snes9x-x64.exe". Didn't need the key delay (which some emulators do. i.e. MAME) and the WInWaitACtive alleviates any guessing games for the Sleep timer. Be sure it's above any escape sequence. If that still doesn't work for you, then there's something else wonky going on. It'd also mean it's time to move to BigBox and a proper controller. Quote Link to comment Share on other sites More sharing options...
MCF Posted April 28, 2023 Share Posted April 28, 2023 On 4/26/2023 at 11:55 PM, JoeViking245 said: Download and tested a game and the following worked for me. WinWaitActive ahk_exe snes9x-x64.exe send 7 This assumes your executable is "snes9x-x64.exe". Didn't need the key delay (which some emulators do. i.e. MAME) and the WInWaitACtive alleviates any guessing games for the Sleep timer. Be sure it's above any escape sequence. If that still doesn't work for you, then there's something else wonky going on. It'd also mean it's time to move to BigBox and a proper controller. Could this be failing becuase I configured SNES9X to be fullscreen by default? Quote Link to comment Share on other sites More sharing options...
JoeViking245 Posted April 28, 2023 Share Posted April 28, 2023 5 hours ago, MCF said: Could this be failing becuase I configured SNES9X to be fullscreen by default? Just tried fullscreen. Still worked here (sending "7"). Are you using v1.62.3? You may try a [temp] fresh install of SNES9x. Create a new folder next to the original install (/Emulators/SNES9xTEMP/). Open "snes9x-1.62.3-win32-x64.zip" (that's the one I downloaded) with 7-Zip and drag/drop the files into the new TEMP folder. Use 7-Zip so you don't have to mess with un-blocking any of the files. Start it once and close (in case it needs to create any files on 1st run). Don't change any settings at this point. In LB, edit the emulator and change the app path to "snes9x-x64.exe" that's in the new temp folder. I tried it with and without "-port1 mouse1" in the default command-line and both ways worked to send 7. I never tested actual playing with a mouse (because that would be weird ). But at game startup, the screen text would appear briefly. 1 Quote Link to comment Share on other sites More sharing options...
MCF Posted April 29, 2023 Share Posted April 29, 2023 I only setup the Mouse and Superscope games in Launchbox... other SNES games I play on a Super Nt. Some games like Shien's Revenge and Mario & Wario are really fun mouse games, and do not work with controllers. I have the 24 April SNES9X Git installed, and have the Fullscreen on ROM Open checkbox ticked, but the results are still the same. Sending 7 just does not work on my PC. I gave up setting up the AHK for the mouse in SNES9X and switched to Mednafen. Thanks for all your help @JoeViking245... SNES9X is just being stubborn on my PC I guess. 1 Quote Link to comment Share on other sites More sharing options...
Cnells2000 Posted May 3, 2023 Share Posted May 3, 2023 (edited) Hello Guys. Sorry If I Broke The topic but Im Using The MelonDS Emulator and i can't for the life of me get it to go in fullscreen by pasting the below script in running autohotkey Script. Usually i dont have this problem and it usually works but it will not for MelonDs... this is the script i use currently....... Sleep, 5000 Send, {F11} Or I Use Sleep, 5000 Send, !{Enter} It Wont Work Tho.... I even disabled startup screen An Alternative I thought about is getting an AHK script to wait 5 Seconds then Hold Alt and then pressing enter. Pressing Either Hotkey I change It to whether it is Alt+Enter Or F11, it works when i manually press it with my fingers, But It Does Not Work at all By Script. Please Help. heres the video of whats happening and screenshot of settings. and the video. Melon Video.mp4 Emulator Settings Edited May 3, 2023 by Cnells2000 Quote Link to comment Share on other sites More sharing options...
skizzosjt Posted May 3, 2023 Share Posted May 3, 2023 Hi @Cnells2000 it's likely you need to try methods that get more specific if the method you tried isn't working. it would be better to spell out each keystroke press and release for ex Right Alt down, Enter down, Enter up, Right Alt up same would go for the F11 version F11 down, F11 up instead of just the F11 which implies the down and up but as you can see doesn't always translate well to every program Sleep, 5000 SetKeyDelay, 50 Send {F11 down}{F11 up} or Sleep, 5000 SetKeyDelay, 50 Send {RAlt down}{Enter down}{Enter up}{RAlt up} keydelay further mimics closer to human input since some programs might not poll inputs quick enough to detect them otherwise. hopefully all this does the trick 1 1 Quote Link to comment Share on other sites More sharing options...
JoeViking245 Posted May 3, 2023 Share Posted May 3, 2023 4 hours ago, Cnells2000 said: Using The MelonDS Emulator and i can't for the life of me get it to go in fullscreen Needs a SetKeyDelay. Also, instead of guessing how long to pause for, simply wait for the executables window to become active. WinWaitActive ahk_exe melonDS.exe SetKeyDelay, -1, 110 Send, {F11} A year and a half ago I had it in a loop waiting until the window is active. This way (above) does the same thing, but a lot cleaner. 1 Quote Link to comment Share on other sites More sharing options...
Cnells2000 Posted May 3, 2023 Share Posted May 3, 2023 9 hours ago, skizzosjt said: Hi @Cnells2000 it's likely you need to try methods that get more specific if the method you tried isn't working. it would be better to spell out each keystroke press and release for ex Right Alt down, Enter down, Enter up, Right Alt up same would go for the F11 version F11 down, F11 up instead of just the F11 which implies the down and up but as you can see doesn't always translate well to every program Sleep, 5000 SetKeyDelay, 50 Send {F11 down}{F11 up} or Sleep, 5000 SetKeyDelay, 50 Send {RAlt down}{Enter down}{Enter up}{RAlt up} keydelay further mimics closer to human input since some programs might not poll inputs quick enough to detect them otherwise. hopefully all this does the trick after trying your method With RALT and Enter Everything Is Working Fine Now. Also I Changed it To 8000 To make It maximize Just In Time. Thank you Guys So Much for your help. 1 Quote Link to comment Share on other sites More sharing options...
LtMetal Posted May 11, 2023 Share Posted May 11, 2023 Looking for help guys and I'm sure someone has already asked this BUT... When I run BigBox I use an Xbox controller and have assigned start+back to exit the game to go back to game selection. I am using PCS2X app and the PS2 games run great but when I exit to game selection PCS2X comes up and makes me use my mouse to close it. What script could someone suggest I try to close the window and continue using BigBox all with the xbox controller? Thanks in advance everyone, this is really going to help my experience I have envisioned for my system. Quote Link to comment Share on other sites More sharing options...
JoeViking245 Posted May 11, 2023 Share Posted May 11, 2023 9 hours ago, LtMetal said: when I exit to game selection PCS2X comes up and makes me use my mouse to close it. Better than using a script.... verify that you don't have Confirm Shutdown checked. 1 Quote Link to comment Share on other sites More sharing options...
LtMetal Posted May 12, 2023 Share Posted May 12, 2023 Thanks for replying Joe, I have double checked and confirm shutdown was and remains unchecked. The game closes fine but PCS2X stays open over BigBox. I'd love to hear any other suggestions you or anyone else may have. Not sure if I can map my controller to ALT+F4 but even force focus BigBox dosnt work. Everything halts as PCS2X just waits to be shut down manually. Quote Link to comment Share on other sites More sharing options...
JoeViking245 Posted May 12, 2023 Share Posted May 12, 2023 4 hours ago, LtMetal said: Thanks for replying Joe, I have double checked and confirm shutdown was and remains unchecked. The game closes fine but PCS2X stays open over BigBox. I'd love to hear any other suggestions you or anyone else may have. Not sure if I can map my controller to ALT+F4 but even force focus BigBox dosnt work. Everything halts as PCS2X just waits to be shut down manually. If you're using a recent version of PCSX2, specifically QT (recommended), in your Default Command-line parameters (when you edit the emulator in LaunchBox) put -nogui "Old" PCSX2 would have you put "--batch" (I believe that's what it was). Also, to have it start in full screen, you can either open PCSX2 emulator and check the box for fullscreen, or add "-fullscreen" (old way was "--fullscreen" (2 dashes) [both without quotes]) to the command-line parameters. (sorry. I had forgot about the -nogui part) Quote Link to comment Share on other sites More sharing options...
Madhead Posted May 24, 2023 Share Posted May 24, 2023 I was wondering if anyone knew how to set the save and load states for Citra in the pause menu? By default it's Ctrl+V and Ctrl+C to load and save games on that emulator so I thought this would work: Quote Send {Ctrl down} Sleep 50 Send {C down} Sleep 50 Send {C up} Sleep 50 Send {Ctrl up} Sleep 50 Cos thats how it works for Snes9x but it's Shift+F1 instead of Ctrl+C. But I'm honestly clueless how it works and it's clear that not all emulators pick up the same AHK commands. Does anyone know how I would add load and save states to the pause menu for citra games? Quote Link to comment Share on other sites More sharing options...
skizzosjt Posted May 24, 2023 Share Posted May 24, 2023 16 hours ago, Madhead said: I was wondering if anyone knew how to set the save and load states for Citra in the pause menu? By default it's Ctrl+V and Ctrl+C to load and save games on that emulator so I thought this would work: Cos thats how it works for Snes9x but it's Shift+F1 instead of Ctrl+C. But I'm honestly clueless how it works and it's clear that not all emulators pick up the same AHK commands. Does anyone know how I would add load and save states to the pause menu for citra games? could be because you used a generic "Ctrl" key instead of specifying which one. Try using the same script but use "LCtrl" instead. Also do not capitalize "C" due to it would imply sending a capitalized C which requires also hitting the shift key. So I believe what your script is actually sending is more like "Ctrl, SHIFT, C" and that alone might make the Citra hotkey not work. AHK is weird here, it doesn't matter if the letter is capital or not if it's a hotkey. ie if you make two hotkeys like so, both of these would work the same, exiting the script A::ExitApp a::ExitApp Both of those hotkeys would trigger with the "a" or "A" key press, as in whether or not you hold the shift key. So using "a" or "A" is interchangeable in the context of a hotkey. Lowercase/uppercase doesn't matter But when a letter is in the send command it is case sensitive as I described above. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.