Jump to content
LaunchBox Community Forums

Visual Pinball Joytokey Batch Ultra Noob


Recommended Posts

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!!!!

Link to comment
Share on other sites

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.image.thumb.png.e7b5234b3598c5fd95b0652ec52bb5c2.pngNothing needs to go in the "Running AutoHotKey Script" and "Exit AutoHotKey Script" tabs.   Then just point to the table.image.png.44cefd6f431f54a46d6025b288fa2a71.png

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.image.thumb.png.147bf724aef8485eddf5440d8662a5a5.png 

Problem is this part you'd have to do for each table.


  • Thanks 1
Link to comment
Share on other sites

@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. 

Link to comment
Share on other sites

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. 

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...