paulmichel21 Posted November 22, 2016 Share Posted November 22, 2016 how to run bat file with ahk script? any help? thanks Quote Link to comment Share on other sites More sharing options...
CoinTos Posted November 22, 2016 Share Posted November 22, 2016 Are you looking for a complete script or just the best way to run a bat file in an autohotkey script you already started? ; Set batch file path batchpath = c:\example\example.bat ; Run bat script, hide cmd window Run, %comspec% /c %batchpath%,,Hide The above is most likely what you are looking for, if not let me know. Quote Link to comment Share on other sites More sharing options...
ckp Posted November 22, 2016 Share Posted November 22, 2016 If you just want to run Xpadder for the emulator and exit Xpadder when closing the game, just use this in the ahk tab: run, r:\somefolder\xpadder /m $Esc:: { Run, c:\windows\system32\taskkill.exe /f /im Xpadder.exe Process, Close, {{{StartupEXE}}} } This assumes you use escape and/or controller automation to exit your games. Change the paths to match where your files are. Quote Link to comment Share on other sites More sharing options...
paulmichel21 Posted November 22, 2016 Author Share Posted November 22, 2016 6 hours ago, ckp said: If you just want to run Xpadder for the emulator and exit Xpadder when closing the game, just use this in the ahk tab: run, r:\somefolder\xpadder /m $Esc:: { Run, c:\windows\system32\taskkill.exe /f /im Xpadder.exe Process, Close, {{{StartupEXE}}} } This assumes you use escape and/or controller automation to exit your games. Change the paths to match where your files are. Awesomeeeeee....!!!!! Thanks. I add line to load the profiles and work very well run, r:\somefolder\xpadder /m r:\somefolder\profiles\somename_profile /m Quote Link to comment Share on other sites More sharing options...
paulmichel21 Posted November 22, 2016 Author Share Posted November 22, 2016 11 hours ago, CoinTos said: Are you looking for a complete script or just the best way to run a bat file in an autohotkey script you already started? ; Set batch file path batchpath = c:\example\example.bat ; Run bat script, hide cmd window Run, %comspec% /c %batchpath%,,Hide The above is most likely what you are looking for, if not let me know. excelent. But something is wrong, I need to open that bat by pressing the Esc key like this $Esc::Run, %comspec% /c %batchpath%,,Hide but dont works. any idea? Quote Link to comment Share on other sites More sharing options...
CoinTos Posted November 22, 2016 Share Posted November 22, 2016 36 minutes ago, paulmichel21 said: excelent. But something is wrong, I need to open that bat by pressing the Esc key like this $Esc::Run, %comspec% /c %batchpath%,,Hide but dont works. any idea? $Esc::Run, %comspec% /c "c:\example\example.bat",,Hide Change the example path and bat file to yours and that should work. Quote Link to comment Share on other sites More sharing options...
paulmichel21 Posted November 23, 2016 Author Share Posted November 23, 2016 On 22/11/2016 at 10:56 AM, CoinTos said: $Esc::Run, %comspec% /c "c:\example\example.bat",,Hide Change the example path and bat file to yours and that should work. mmm dont works.. code: batchpath = E:\Hyperspin\emulators\irocker\killprocess.bat $Esc::Run, %comspec% /c "E:\Hyperspin\emulators\irocker\killprocess.bat",,Hide any idea? Quote Link to comment Share on other sites More sharing options...
paulmichel21 Posted November 23, 2016 Author Share Posted November 23, 2016 I install autohotkey and i create file ahk with this code and add application in game and works.. for some one razon ahk dont work with LB in this app Quote Link to comment Share on other sites More sharing options...
CoinTos Posted November 24, 2016 Share Posted November 24, 2016 12 hours ago, paulmichel21 said: mmm dont works.. code: batchpath = E:\Hyperspin\emulators\irocker\killprocess.bat $Esc::Run, %comspec% /c "E:\Hyperspin\emulators\irocker\killprocess.bat",,Hide any idea? I would have to see the batch file because my test.bat launched every time with either way, hardcoded ($Esc::Run, %comspec% /c "c:\scripts\test.bat",,Hide) or with variable defined at top (batchpath=c:\scripts\test.bat) and set in command ($Esc::Run, %comspec% /c %batchpath%,,Hide) 5 hours ago, paulmichel21 said: I install autohotkey and i create file ahk with this code and add application in game and works.. for some one razon ahk dont work with LB in this app So you got working then outside of launchbox ahk? Quote Link to comment Share on other sites More sharing options...
paulmichel21 Posted November 24, 2016 Author Share Posted November 24, 2016 Yea working outside LB ahk. the solution is add app in game setup LB 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.