Jason Carr Posted April 11, 2017 Share Posted April 11, 2017 Just now, ckp said: So you didn't get ANY popup when using it in the ahk tab? @Jason Carr, is the ahk tab functionality supposed to be included in the free version of Launchbox? Yes. It's the controller automation features (which are actually not done by AutoHotkey at all anymore) that are premium-only. Quote Link to comment Share on other sites More sharing options...
makaveeti Posted April 11, 2017 Author Share Posted April 11, 2017 @ckp that's right. I got no pop up at all when using the ahk tab. Quote Link to comment Share on other sites More sharing options...
ckp Posted April 11, 2017 Share Posted April 11, 2017 (edited) hey @makaveeti, where are you putting the ahk code in LB exactly? Can you post screenshots of all the tabs of the window you have pasted the ahk code into? Edit: The ahk tab runs at the emulator level (Manage Emulators menu option). I don't think your game is an emulated game right? So, I'm not clear about where you are putting this ahk code, but I'm 99% sure that is why nothing is running for you for this specific game. For a specific game, you are much better off using the ahk script/exe in the additional apps of the game which indeed works for you. That is the best method for you to do this with that game. Edited April 11, 2017 by ckp Quote Link to comment Share on other sites More sharing options...
makaveeti Posted April 12, 2017 Author Share Posted April 12, 2017 @ckp - You are 100% correct. Well done for identifying the root cause. I tried using the ahk script tab with an emulated game and the scripts work fine! With regards to Streets of Rage Remake (Windows Game), I created a standalone exe with the following code (see below). After holding button10 and then pressing button 9 on my gamepad, the processes for streets or rage and AHK are closed. I configured LB to launch the ahk exe before the game. Happy days Joy9:: If GetKeyState("Joy10") Process, Close, sorR.exe Process, Exist, Autohotkey.exe If ErrorLevel <> 0 Process, Close, Autohotkey.exe Exitapp Return Quote Link to comment Share on other sites More sharing options...
ckp Posted April 12, 2017 Share Posted April 12, 2017 (edited) very noice !! you shouldn't have to do this (in fact, i wouldn't do it): Process, Exist, Autohotkey.exeIf ErrorLevel <> 0 Process, Close, Autohotkey.exe ExitApp should be good. Edited April 12, 2017 by ckp Quote Link to comment Share on other sites More sharing options...
makaveeti Posted April 12, 2017 Author Share Posted April 12, 2017 (edited) 3 hours ago, ckp said: very noice !! you shouldn't have to do this (in fact, i wouldn't do it): Process, Exist, Autohotkey.exeIf ErrorLevel <> 0 Process, Close, Autohotkey.exe ExitApp should be good. Thanks mate. Code looks cleaner. I'm interested in amending the code so that holding Button9 and button10 for 2 seconds will cause sorR.exe and AHK to exit. Here is my attempt. It works perfectly for button9 only. What needs adding so that holding both button9 and button10 together for 2 seconds executes the script? Joy9:: KeyWait,Joy9,T2 ;wait 2 seconds for release key If (ErrorLevel) ;more than 2 sec have passed { Process, Close, sorR.exe Exitapp } Return Edited April 12, 2017 by makaveeti Quote Link to comment Share on other sites More sharing options...
ckp Posted April 12, 2017 Share Posted April 12, 2017 3 hours ago, makaveeti said: Thanks mate. Code looks cleaner. What if I wanted to use one joypad button instead as a hotkey but the condition was that it had to be held down for 3 seconds? I'm sure it's possible, but I haven't tried it. Maybe play with autohotkey's KeyWait. Someone else around here probably has the code for this exact thing. Might want to post a new thread for this. 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.