YoYo Posted December 3, 2016 Share Posted December 3, 2016 Hello, first post here. I really like Launchbox, it's working well for me. Is there a way to access the Platform or System name and Game or ROM name in the AutoHotKey script tab of the Edit Emulator window? Kinda like you can use {{{StartupEXE}}}. I would like to do things with that info when launching games. Thanks Quote Link to comment Share on other sites More sharing options...
ckp Posted December 15, 2016 Share Posted December 15, 2016 I'd also like to know what is available, if anything, like {{{StartupEXE}}} . Maybe only @Jason Carr knows. Quote Link to comment Share on other sites More sharing options...
markmon Posted January 6, 2017 Share Posted January 6, 2017 Well since the AHK scripts are specific to emulators, you already know your platform and system names so you don't need the script to pass that. I would try this: Create an autohotkey script for your emulator that does something like: msgbox %0% msgbox %1% msgbox %2% msgbox %3% and run a game. See if any of those populate with anything useful. Quote Link to comment Share on other sites More sharing options...
igotdvds Posted January 8, 2017 Share Posted January 8, 2017 Third this...@markmon..none of those work. Ive asked this in a duplicate thread by accident. PLEASE someone help me here. Also @ markmon, the emulator name and platform name would actually be beneficial for my purposes. Quote Link to comment Share on other sites More sharing options...
ckp Posted January 8, 2017 Share Posted January 8, 2017 i've also asked this in a different thread with no answer. So what was in the msg box popups? were they empty? Quote Link to comment Share on other sites More sharing options...
igotdvds Posted January 8, 2017 Share Posted January 8, 2017 3 hours ago, ckp said: i've also asked this in a different thread with no answer. So what was in the msg box popups? were they empty? All empty. I have a big thing in the works for LaunchBox if I can easily access some information from the application. Quote Link to comment Share on other sites More sharing options...
ckp Posted January 8, 2017 Share Posted January 8, 2017 maybe @Jason Carr can give you some love on this... Quote Link to comment Share on other sites More sharing options...
markmon Posted January 8, 2017 Share Posted January 8, 2017 There are always alternative ways to do things. The ahk script here may not be needed at all. On my set up, for example, I point launchbox the emulator exe which is actually an ahk script that runs the emulator and does some other stuff. You'd handle that outside of launch box and you get passed the full path and filename of the Rom. You would know the name of the emulator at that point as well. Not sure what you're trying to do but the launch box ahk only runs when a game is launched anyway Quote Link to comment Share on other sites More sharing options...
igotdvds Posted January 9, 2017 Share Posted January 9, 2017 3 hours ago, markmon said: There are always alternative ways to do things. The ahk script here may not be needed at all. On my set up, for example, I point launchbox the emulator exe which is actually an ahk script that runs the emulator and does some other stuff. You'd handle that outside of launch box and you get passed the full path and filename of the Rom. You would know the name of the emulator at that point as well. Not sure what you're trying to do but the launch box ahk only runs when a game is launched anyway Please elaborate.... My goal is to have the user run anything in LB or BB and have it pass system name, rom path, emulator path, etc. to another application so it can interact back and forth. Quote Link to comment Share on other sites More sharing options...
ckp Posted January 9, 2017 Share Posted January 9, 2017 maybe you can try creating a test emulator in LB that is just a batch file and try launching it with some game or fake game to see what gets passed. i'm pretty sure system and rom gets passed. the batch file could be like: echo %1 >> c:\temp\test.txt echo %2 >> c:\temp\test.txt echo %3 >> c:\temp\test.txt and then look at c:\temp\test.txt to see what was passed. Quote Link to comment Share on other sites More sharing options...
igotdvds Posted January 9, 2017 Share Posted January 9, 2017 38 minutes ago, ckp said: maybe you can try creating a test emulator in LB that is just a batch file and try launching it with some game or fake game to see what gets passed. i'm pretty sure system and rom gets passed. the batch file could be like: echo %1 >> c:\temp\test.txt echo %2 >> c:\temp\test.txt echo %3 >> c:\temp\test.txt and then look at c:\temp\test.txt to see what was passed. I dont want to modify the existing configuration. I want the user to use LB to configure their emulators as they do today but allow my app the ability to know what system and other information so it can hook in to LB and give them additional options during gameplay across all emulators. Think universal pause capability and access to image directories. Quote Link to comment Share on other sites More sharing options...
ckp Posted January 9, 2017 Share Posted January 9, 2017 that was just an example for you to see what args are passed when emulators launch. anyway sounds like you have something very interesting brewing. maybe you need to talk to LB devs. Quote Link to comment Share on other sites More sharing options...
igotdvds Posted January 9, 2017 Share Posted January 9, 2017 31 minutes ago, ckp said: that was just an example for you to see what args are passed when emulators launch. anyway sounds like you have something very interesting brewing. maybe you need to talk to LB devs. Indeed. I'm waiting on one to respond to this thread. Quote Link to comment Share on other sites More sharing options...
Jason Carr Posted January 9, 2017 Share Posted January 9, 2017 Hey guys, currently no variables are passed to the AHK scripts, so it's not possible currently. Please put in a ticket using Issues/Requests in the header to request it. Quote Link to comment Share on other sites More sharing options...
igotdvds Posted January 10, 2017 Share Posted January 10, 2017 2 hours ago, Jason Carr said: Hey guys, currently no variables are passed to the AHK scripts, so it's not possible currently. Please put in a ticket using Issues/Requests in the header to request it. Done: https://bitbucket.org/jasondavidcarr/launchbox/issues/2288/pass-variables-to-ahk-script-from-lb-bb 1 Quote Link to comment Share on other sites More sharing options...
Crush Posted January 27, 2017 Share Posted January 27, 2017 For emulators like Hoxs64 which display a dialog box when you save/load the game state, the ability to pass the romname to an AHk script could automate the save/load of multiple game states. Quote Link to comment Share on other sites More sharing options...
markmon Posted January 28, 2017 Share Posted January 28, 2017 This is super easy to handle via an ahk script that launched the game emulator executable (and I'd argue that anyone that knows how to write an ahk script to do anything with the Rom name would also know how to write an ahk script that also replaces the emulator executable) . Happy to provide an example here. Basically, create an ahk like starthosx64.ahk and have it parse the incoming command line, runwait the actual emulator and then it can handle events as well in the script. Edit the emulator set up inside launch box to run starthosx64.exe instead and you're done. Quote Link to comment Share on other sites More sharing options...
igotdvds Posted January 28, 2017 Share Posted January 28, 2017 41 minutes ago, markmon said: This is super easy to handle via an ahk script that launched the game emulator executable (and I'd argue that anyone that knows how to write an ahk script to do anything with the Rom name would also know how to write an ahk script that also replaces the emulator executable) . Happy to provide an example here. Basically, create an ahk like starthosx64.ahk and have it parse the incoming command line, runwait the actual emulator and then it can handle events as well in the script. Edit the emulator set up inside launch box to run starthosx64.exe instead and you're done. What items are available to pass in this way? %gameid% is a new one..what are the others? Quote Link to comment Share on other sites More sharing options...
markmon Posted January 28, 2017 Share Posted January 28, 2017 You will get the exact command line that the emulator receives in this case. You can tell by launching a game, load task manager while it's running, poke around to select columns and enable command line and you can see the exact command line sent to the emulator. It'll most likely be the executable for the emulator as arg 1 and the path to the Rom and rom file as arg 2. Quote Link to comment Share on other sites More sharing options...
igotdvds Posted January 28, 2017 Share Posted January 28, 2017 3 minutes ago, markmon said: You will get the exact command line that the emulator receives in this case. You can tell by launching a game, load task manager while it's running, poke around to select columns and enable command line and you can see the exact command line sent to the emulator. It'll most likely be the executable for the emulator as arg 1 and the path to the Rom and rom file as arg 2. I have launcher scripts already i place for other purposes but I cant find any documentation regarding how to structure the command line arguments to pass variables. is it as simple as %1% and %2%? Do you have a screenshot or perhaps documentation I haven't seen? 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.