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. Thank you for your support. Tom Speirs

Patreon

Pinball Arcade Script


andyco

Recommended Posts

hi all

as anyone got a working Script for Pinball Arcade for table selection for version 1.26.12 with the new tables added. i have tryed with my old script that wos working with version 1.20.6 and i added the new tables in it, but cant get it to work. its not picking the right table that i select from the wheel.its picking 2nd table after the one i pick. thanks

Link to comment
Share on other sites

Ah I was wondering who wrote that script :cheers: - I did try it from the FTP.

Would love to know what you did to get it to work as it was erratic for me - seemed to buffer about 5 clicks then loose count.

Maybe I need to try it again, what input setting did you choose in the config app?

Going back to your main question the first menu is different with you starting (in my case) on "challenges" and not "mytables" so I guess you need to add a right key press before you can enter my tables?.

Don`t have time to test before the weekend but I hope that helps?.

post-6857-0-60867000-1402396639_thumb.jp

EDIT, So this got under my skin so I just spent a couple of hours messing with it - and I do not even like PA that much!.

The outcome is that it is still just as inconsistent for me and I`m very frustrated with it.

Turns out you do not need to add any rightwards navigation, just remove the sleep to go straight into "mytables".

As an example AFM is the starting table so the 0 skip should just work but for me it still skips down one.

Removing the "skip" and just adding an "enter" for AFM still takes me one step in the menu? :unsure: .

I think PA is mostly to blame as if you repeatedly hit down you sometimes get caught up on a side menu, hold the key in and you scroll cleanly - why?.

Guess you could use ahk to hold down "down" for a set time then release it at the correct table - good luck working out the timings for that though.

So I suppose that is just a long winded way of me saying I give up with this, and having just spent some more time with the game still wonder if it is worth it anyway ^_^ .

Link to comment
Share on other sites

So I have had a breakthrough with this,

Thinking about why on the first screen I was getting sent leftwards from the "my games" menu into the "challenges" menu, and also getting kicked rightwards when navigating tables with seemingly phantom keystrokes the fog cleared and I thought NUDGE!.

Yep a combo of PA a virtuapin plunger and Xpadder are throwing it off, so an increase of my left/right deadzone in Xpadder seems to of sorted it.

The script now seems to act consistently, but still goes to the wrong table but it goes to the same wrong table.

As an example flight 2000 goes to junkyard each time and oddly if you alter the script to navigate up instead of down then junk yard goes to flight 2000?.

However there is no pattern I can see with the six tables I remapped as each has a different amount of wrong "skips".

I think the speed of your puter may make a difference aswell.

You can though of coarse go through your wheel trying each table and noting what table you end up on then correcting the amount of skips needed.

I found that

Flight 2000 = Junk yard

Fun house = High speed

Genie = Haunted house

I corrected the script for these six and they all work just fine now, I am not going to adjust for all the tables as I still do not want to list each table on the wheel.

However if you would like to try the script with just those six working it`s` attached - but you may need to adjust the first sleep for your system.

I also start Pinball arcade indirectly with another AHK (PBA.exe) that runs Irotate first and remaps some keys an example is also attached.

Still not sure PA is worthy of individually listing each table, but I hope this helps somewhat?.

Edit - removed the attachment, see post below.

  • Like 1
Link to comment
Share on other sites

I play this for sure, but unfortunately I don't need a script in my setup. It's pretty awesome that you have gotten this far though. ;)

Link to comment
Share on other sites

Thanks guys, I will mess with it some more at a later date, but am happy with just auto navigating into the "my games" menu then manually navigating to a table as before..

I would rather have a working nudge deadzone than have individual table listing, but realize others desire this.

Wonder if a different method of sending keystrokes is needed, or if maybe a vbs script would be any better IDK?.

Link to comment
Share on other sites

So the thing about having an obsessive personality is that you can not drop things so more time went into this.

Good job I am working at home this week :rolleyes: .

Anyway it seems that the keys set in PA for menu up/down , left/right are important as PA uses L/R to move Up/Down the tables list as well.

I found that I needed to remap my LShift/ RShift flipper keys to arrow L/R with AHK then set PA to use this combo for menu L/R.

Did the same for my magna-save buttons to arrow Up/Down after I realised that PA navigated up even when the script presses down.

After making that change I still need to account for the menu navigation errors for each table but it is consistent at least.

I think the key thing to try for anyone attempting this are to first try different key mappings in PA, then to mess with the length of the sleeps within the script.

You will probably still need to go through each table to correct the amount of skips but at least it should work for you.

So if its any help I will attach the script that works for me with the table settings in the default order, and also my XML.

The XML could do with the manufacturer and date settings corrected.

I am starting PA with a compiled AHK script (PBA.exe) that flips the screen with Irotate and sets my key remaps,

If you want to try this it is included but you will need to edit it for your paths and any remaps you want, then compile it with AHK.

Run, "C:\Program Files (x86)\iRotate\iRotate.exe" /rotate=90   ;Set your own pathRun, C:\PATH TO\PinballArcade.exe                              ;Set your own pathProcess, wait, PinballArcade.exeWinWait, ahk_class Pinball ArcadeWinWaitActive, ahk_class Pinball Arcadeprocess, WaitClose, PinballArcade.exeRun, "C:\Program Files (x86)\iRotate\iRotate.exe" /rotate=0       ;Set your own pathExitApp;------------keyremapping--------------------------------------------------------#IfWinActive ahk_class Pinball ArcadeLShift::Left                             ;Old key - New keyRShift::Right]::Downx::Spacee::Escape1::Backspace#IfWinActive;-------------------------------------------------------------------------------

Here are the settings used......

post-6857-0-37212000-1402570119_thumb.pn

PA.zip

  • Like 1
Link to comment
Share on other sites

Played a bit more with this and it seems its still not right.

If starting a table early in the menu it works fine, but tables towards the end with lots of downwards keystrokes kick me back out into PinballX.

Alt tabbing back to TPA the game is still running but I have lost focus?.

One other odd thing is that I have noticed that I then have some black playfield screenshots in my screenie folder - even though no key is mapped to "S".

Nothing should be sending "S" just arrow down and enter and TPA has not used that key for anything - sticky keys are turned off in win7 so IDK?.

Could there be a keyboard setting that needs adjusting?.

I wonder if farsight changed something to fix flipper lag between releases maybe?.

Link to comment
Share on other sites

ok thanks for the info im have put version 1.20.4 of pinball arcade back on and used my orginal script and it work fine with that. just not got the new tables on it but can live with that for now. the only thing wrong is when i first run pinballx then select a pinball arcade table i just get black screen but can still hear it clcking in background. so i exit back to pinballx then run it again and its ok its just the first time it happens.

Link to comment
Share on other sites

  • 1 month later...

This is not quite a full fledged solution. I purchased the Launch Pack for a penny in the Steam Summer Sale, and I only included Black Hole as a selectable table. There are already excellent versions in VP for TOTAN, TOM, and Ripley's. I'm probably not going to purchase other tables through Steam until there is better cab support, unless they sell something else for a penny. This script launches right into Black Hole every time. Requires the display.exe command line screen rotation tool. I found display.exe in the Script section of the FTP.

This is just another variation on the scripts floating around except that it is the ahk script that is launching the program rather than PinballX. I think this gets around potential focus issues I was having.

But my problem might have been the lesser known issue about configuring PBA for a cab. At least it took me a while to figure it out. The program itself must be configured for portrait mode. Rotate the main playfied screen from landscape to portrait. Then start PBAconfig and define the resolution. For me, 1080 x 1920. Save the settings and set the playfield screen back to landscape, and now the script will work correctly.

#NoEnv  #SingleInstance forceTable = %1% 	;Variable from PinballXRegRead, SteamDirPath, HKCU, Software\Valve\Steam, SteamPathrun Display.exe /rotate:90sleep 2000Run, "%SteamDirPath%\Steam.exe" -applaunch 238260,,UseErrorLevelcheckprocessagain:	Process, wait, PinballArcade.exe, 5.5	NewPID = %ErrorLevel%  ; Save the value immediately since ErrorLevel is often changed.	if NewPID = 0			goto checkprocessagainGosub, %table%process, WaitClose, %NewPID%run Display.exe /rotate:0ExitApp;Table SelectionBlack_Hole:	Skip=0    Goto Navigation		Navigation:		Sleep, 10000		Send {Enter Down}, Send {Enter Up} 	; skip "press start"		Sleep, 1500		Send {Down Down}, Send {Down Up}		Sleep, 1500		Send {Right Down}, Send {Right Up}		Sleep, 1500		Send {Enter Down}, Send {Enter Up}  ; Skip "MyTables"		Sleep, 1500		loop, %Skip%		{		Send {Down Down}, Send {Down Up}		SoundBeep, 750, 100  		}		Sleep, 3000		Send {Enter}	ReturnReturn
[system_3]
Name=The Pinball Arcade
WorkingPath=C:\PinballX\Scripts
TablePath=
Executable=LaunchTPA.exe
Enabled=True
Parameters=[TABLEFILE]
LaunchBeforeWorkingPath=
LaunchBeforeExecutable=
LaunchBeforeParameters=
I'm using a backglass video for Black Hole. Unfortunately, I've found that even though I'm not hiding the backglass in the xml the backglass does not show up during play. The screen is black while TPA is executing. I haven't seen this happening with any other programs I've installed but I'm thinking it is a TPA issue and not a PinballX issue.
Link to comment
Share on other sites

  • 5 weeks later...

Just for kicks Carny I just tested your solution with more than one table and am sorry to say it has the same issues with menu navigation.

Its a shame but as before the issue has not been getting into the "my tables" menu but navigating around within it.

No matter how long or short the key press one button press will not translate into one menu step and the error just ramps up the further down the menu you go.

Its frustrating to not get this to work, but just getting into the my tables is all that I do and am perfectly happy with that.

Link to comment
Share on other sites

Yeah, aside from directly launching the executable the script is not doing anything different from the others. It only works because I'm navigating to only one table. Perhaps along with the long delayed cab support there will be an option to launch from the command line.

Link to comment
Share on other sites

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