spyksaturn Posted November 28, 2019 Share Posted November 28, 2019 Hi everyone. Been a while since I've been able to get on here. I have found bits of information on this topic that for a complete newb the basics are missing. Basically what I am trying to do is get joytokey to start and end any time I open a visual pinball game through LB. So far what I know is a batch file needs to be made in order to get joy to key to exit when exiting the game because a script will only start joytokey and not exit upon leaving the game. I don't know if it makes a difference but I did have to turn off each tables association with an emulator to get it to launch properly so none of them have an "emulator" per say through launchbox because it won't auto launch the game and instead brings up the emulator as if I am loading the table and still need to hit play to start the table. My assumption then is I may have to do that for each game that is unless I can script it to go through the emulator and automatically hit play after the table loads like it does without the emulator association. Cool with it either way, just don't know the nitty gritty. Lets assume I know what has to be done terminology wise but that I don't know how to do any of it (writing scripts, creating the batch file proper, ect.) I can say that I had to make quite a few batch files for my dreamcast library and the CDI I believe (its been a while) so I know the basics of running the batch program by putting what you want made into a batch file into the proper folder with the batch program but lets assume here that - I don't know how to write scripts (very little programer knowledge) - I don't know how to specifically make a batch file for anything but the mentioned up above - Am not sure how to direct everything properly afterwords to make sure launchbox is reading everything right (ex. do I just redirect to the batch file instead of the "tablename".exe file?) Sorry to make this so wordy or if these are some stupid questions. The closest I get to doing anything script wise or anything related here is working on this launchbox project. I am just a humble retail manager ?. Thanks so much!!!! Quote Link to comment Share on other sites More sharing options...
JoeViking245 Posted November 28, 2019 Share Posted November 28, 2019 I don't know anything about joy2key, but for getting a Visual Pinball (VPX) table to: Hide the editor window launch directly to the table and exit it completely with the Escape key (or whatever you've assigned to quit ...add the Default Command-Line Parameters -minimized -exit -play But definitely setup an emulator for all your tables.Nothing needs to go in the "Running AutoHotKey Script" and "Exit AutoHotKey Script" tabs. Then just point to the table. If you know the command-line to load and unload joy2key, in the games Additional Apps tab, Add Application, browse to your jo2key executable, set the 'load' command line and select Run Before. Select OK. Do the same thing again this time setting the 'unload' command and select Run After. Problem is this part you'd have to do for each table. 1 Quote Link to comment Share on other sites More sharing options...
spyksaturn Posted November 28, 2019 Author Share Posted November 28, 2019 @JoeViking245 worked like a charm. Thank you so much. Now if I could just figure out the command-line to run j2k on opening and close on exit. Quote Link to comment Share on other sites More sharing options...
JoeViking245 Posted November 28, 2019 Share Posted November 28, 2019 Run Before: No command line unless you're loading a specific profile for joytokey. Run After: taskkill /f /im joytokey.exe Quote Link to comment Share on other sites More sharing options...
spyksaturn Posted November 28, 2019 Author Share Posted November 28, 2019 @JoeViking245 Good news, bad news. Good news is I got joytokey to pop up no problem when starting the table. Bad news is the command line didn't work.... So I did a little digging and found this: One of the users on there had a .exe file that was supposed to work instead of the command prompt.... Problem is..... That didn't work either. So I tried it with the command prompt typed the way you typed it and typed the way they typed it..... With there .exe file and without it...... And I am still in the same boat. At a bit of a loss here. Quote Link to comment Share on other sites More sharing options...
spyksaturn Posted November 28, 2019 Author Share Posted November 28, 2019 Tried this batch file from this post as well. Noticed my JoytoKey app under properties is spelled this way with a lowercase "t" for the word to. So I tried changing that in the batch as well to try and get that to work (as I know sometimes case sensitivity is an issue) and I still got nothing. Would the version I have of JoytoKey be incompatible or is there something special I need to do for Windows 10 so that it will work properly. I at least see the black screen flash for a second which suggests the batch s trying to work. Quote Link to comment Share on other sites More sharing options...
spyksaturn Posted November 28, 2019 Author Share Posted November 28, 2019 So I figured out how to make .bat files. Not so hard. So I tried making my own for this and it just does not seem to be working and I don't quite get why. The black screen pops up and I even get the icon showing up below with mine. I just don't quite get why whether I use /f or not I get no results. Could an option or something be blocked off somewhere on windows or on the program its self? Quote Link to comment Share on other sites More sharing options...
spyksaturn Posted November 28, 2019 Author Share Posted November 28, 2019 ok so the issue has been figured out. Morale of the story: Do not run anything you want to close with a .bat as administrator because you wont be given privlages. Everything works perfectly as it should and I thank you again @JoeViking245 1 Quote Link to comment Share on other sites More sharing options...
JoeViking245 Posted November 28, 2019 Share Posted November 28, 2019 Glad it's working! Ya, it seems with any type of gaming oriented programs (emu's to frontends and including batch files as you've found), admin privileges do more harm than good. 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.