Jump to content

All my products and services are free. All my costs are met by donations I receive from my users. If you enjoy using any of my products, please donate to support me. My bare hosting costs are currently not met so please consider donating by either clicking this text or the Patreon link on the right.

Patreon

PinballX changing key timing on launching of Other Sytems?


Recommended Posts

Posted

So I got tired of trying to make PinballX do table section in a timely manner for Pinball Arcade DX11 with camera mod.

I have a simple batch file that launches TPAFreeCamMod then with nircmdc pushes enter twice to get to the main menu in TPA, then it sets the cursor to the tables menu then left clicks.

If I run this batch file I can be at table selection in like 3 seconds.

My question, is when I  try to run this same batch file from PinballX other systems in the "Executable" section it won't work.  It just comes back to PinballX when you select a game with this "Other System"

If I remove TPAFreeCamMod from the batch file and launch that as the exe for this other system, then it launches from PinballX, and I can run my batch file in the launch before and it works, but window focus seems to be messed up.

Should I be able to launch a .bat file as the main Executable for an other system?  Or is it ONLY .EXE's?

Edit:  Changed the title of my question since this turned into a different question,   determined that batch file as the main executable does not seem to work, exe (compiled batch) is fine. 

Curious if anyone has encountered the same I describe down below and figured a way around this.

 

Posted

Well I tried converting the original .bat to an exe and that seems to work fine now. 

Using PinballX to launch the same as a .bat instead of an exe does not seem to work.

Now the only issue I seem to have, anyone know why PinballX takes at least 8 seconds to show the application it launches?  I even removed the loading screen image and I get a black screen for like 7 - 8 seconds before the Pinball Arcade logo screen shows up on my main screen.  TPAFreeCaMMod is already displaying the default black glass, then around 5 seconds later it appears on my main screen.

If I load my batch to exe launcher file on its own from windows, it shows up right away.

 

Posted

When dealing with The Pinball Arcade, all bets are off. The new GUI adds to the delay for most people. Not much can be done to fix that I'm afraid. You might want to attach your pinballx.ini and log.txt (right from when you have attempted to launch a TPA table) for review just in case there is something that can be done to speed things up.

Posted

This is driving me crazy.  I have runme.exe (which is a compiled batch file) that launches PBA DX11 though cameramod,  uses autohotkey and presses enter right after it is launched, goes to the table menu (up key, then right key, then enter) then moves the mouse cursor to the up down arrows on the right side of the screen so I can scroll up and down to select which game I want to play.

Until there is better table selection I figure this is easier for me.  I just have a menu item in Pinball X to launch PBA (not picking any table, because that is REALLY slow and is rarely accurate)  After my batch file runs and I am at the table selection screen I can use a wireless xbox 360 controller (as a mouse) till something is better in the future.

Outside of pinballx, my compiled batch file works 100% of the time, and is really fast compared to doing it with PinballX.  When run from pinballx as an other sytem, it is always hit or miss if it makes it to the table screen.  It looks like Pinball X is somehow making it so my key selection timing is different every time it is launched.  It is hard to describe.  I just know when I use runme.exe outside of PinballX it works every time.

This is the relevant from my pinballx config:

[System_4]
Name=PBA
WorkingPath=C:\games\PinballArcade\mod
TablePath=C:\games\PinballArcade\mod
Executable=runme.exe
Parameters=
WaitForProcess=PinballArcade11.exe
WaitFor=-1
Enabled=True
SystemType=0
LaunchBeforeEnabled=False
LaunchBeforeWorkingPath=C:\games\PinballArcade\mod
LaunchBeforeExecutable=
LaunchBeforeWaitForExit=False
LaunchBeforeHideWindow=True
LaunchAfterEnabled=False
LaunchAfterWorkingPath=C:\games\PinballArcade\mod
LaunchAfterExecutable=
LaunchAfterWaitForExit=False
LaunchAfterHideWindow=False

This is runme.exe (in bat form:)

@echo off
cd c:\games\PinballArcade\mod
start TPAFreeCamMod.exe
autohotkey send.data.ahk

This is send.data.ahk:

Sleep, 10000
WinActivate ("Pinball Arcade DX11")
Send, {Enter down}
Sleep 100
Send, {Enter up}
Sleep, 500 
Send, {Up down}
Sleep 100
Send, {Up up}
Sleep, 500 
Send, {Right down}
Sleep 100
Send, {Right up}
Sleep, 500
Send, {Enter down}
Sleep 100
Send, {Enter up}
Sleep, 500
MouseMove, 920, 1200
return

The Sleep, 10000 is required because PinballX takes so long to return to the PBA screen after it launches my exe.  If I run the batch/exe outside of PinballX I can make that as low as 2 seconds and I am at the table selection screen in like 4 seconds.

 

Posted

Just saying, it is weird to me that you are running both a bat and ahk. May not help but you could streamline by putting all into an ahk and compiling into an executable.

If you haven't already gone through this process then try increasing sleep and key delays. Get it working and then start decreasing sleep and key delays. I know it works great outside of PinballX, but that only helps you if you intend on never running inside PinballX.

Finally, my piece of advice is uninstall Pinball Arcade. It doesn't offer anything that Visual Pinball does not already do much better. But that's just one guy's opinion on the Internet.

Sent from my iPad using Tapatalk

Posted

Yeah I only wound up with the AHK within the batch because it evolved into that.  I had started out with a batch file using nircmd and when I had that working perfectly, again called from PinballX, nothing worked the same.  I even tried some other command line mouse.exe tool, same deal would work fine outside of PinballX but would act differently when launched through it.  Yeah I had already experiemented with key delays, the AHK I have above works 100% of the time and has the same exact delays between keystrokes every time called on its own.  Through PinballX, it seems like it changes each run.  Sometimes a right key does not register, but then another time it goes over 2 instead of just one.. 

I guess I will  try that next I just figured PinballX must be doing something and was hoping someone knew what is going on here.  And yeah I know I should probably just do this all in Visual Pinball and be able to actually launch my individual tables from within PinballX, (and actually control it with the buttons I have installed in my cabinet) it might come to that.  I am not familiar with all the ins and outs yet with that application.  I just finished my 3 screen cabinet a few weeks ago and got Pinball Fx2 setup the way I want it, and was hoping to get this taped together enough so I would not have to take the time to get to know and tweak all the Visual Pinball tables right away.  I had planned on doing that at some point.  Maybe I will do it sooner if I cant find a solution.

Thanks

 

Posted

Also confirmed if I kill pinballx.exe as soon as my AHK launches, it works fine launching and selecting in the game. If I don't it does not.

Is there something I can disable in PinballX that might be getting in the way with this to test?

 

Edit: switching to one single AHK compiled as an EXE has the same issue, if I add a statement to kill PinballX.exe first, all keystrokes work fine consistently.

 

Guest
This topic is now closed to further replies.
×
×
  • Create New...