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 DOF Built-in Commands (Looking for a PinballX Exit/Shutdown Command) - SOLVED


Recommended Posts

Posted

Building a Hybrid Shuffle Alley and when done playing, during shutdown, I would like to down (cycle them all up) all the pins to be stowed, so need to fire the solenoids on exit.  There is a $PBXQuit, but it's for quitting a menu, there seems to be no shutdown or pinballx exit type command.  Any workaround or possible solution?

Tried the DirectOutputTest command with mjr, but would have to recompile program due to some version issues.  Ref:  https://www.vpforums.org/index.php?showtopic=49149

The only list of PinballX DOF commands I can find is here, don't see an option:  http://pinball.weile...putwip/pbx.html

Hybrid Project status at:  https://www.vpforums.org/index.php?showtopic=48917

Posted

On VP Forum, you mention that the command file DirectouptutTest.exe should be recompiled.

In the attached zip, I recompiled the Code of MJR. It was missing some DLL's, so I add them from my system .
I copied it to my cabinet, extract the zip (all files), added the path settings and run it :

image.thumb.png.f43b61d5e5be07e9797e6374a90f0925.png

I hope this will help you, to use this exe and do stuff with a batch file on PBX closing

If you definitely want to use a plugin with a PBXExit command, maybe @scutterscan help you, as he build multiple plugins for PBX (and I reach out to him if I want some help :) )  

DirectOuput.zip

  • Thanks 1
Posted

I'm not a DOF user so forgive any ignorance on my part, but yes there is an event for plugins on PinballX exit (in the documentation pages you linked it's  Event_App_Exit).

Looking at the plugin code (as documented) that event is on line 388  http://pinball.weilenmann.net/docu/directoutputwip/_direct_output_01_pinball_x_01_plugin_2_plugin_8cs_source.html , and there is no SendAction("PBXExit") type line so if you're using that plugin i think it'll need a code change. 

I guess maybe another option would be a a pinballx exit / launch after program or batch file? 

Sorry that's about all i can suggest with my limited knowledge of dof

  • Thanks 1
Posted

@Mike_da_Spike,

Thanks, that fixed it...  It has some unique parameter options you can run from a batch file...  * for all or 1-32 for a range and the sleep for a delay before going to next command, can even combine on one line.

DirectOutputTest.exe 1 * 50 sleep 1 * 100 sleep 1 * 200 sleep 1 * 255
DirectOutputTest.exe 1 1-32 255
DirectOutputTest.exe 1 1-32 0

Only issue now is it leaves you at a prompt within DirectOutputTest.exe and you can not automatically end the batch without entering quit for each line entry, ther must be some paramters for a quite mode that doesn't echo each command and also something to automatically exit.

Thanks for the help, wasted the night playing with LEDBlinky, same type of utility, but very unstable and limited, needs to be preloaded or a massive delay and batch lockup on first pass.  Also, interferes with DOF during play and PBX while it's running in the tray.

Posted

@scutters,

I was able to make the lights ramp up on PBX startup and ramp down on closing PBX through the setting screens, so will play around with the pins tomarrow, cause have to careful not to leave any on as the solenoids are only designed for a pulse and there are no pulse options, only on/off/0-255, have to control delays with the sleep command.  Should be able to get it setup good...  Thanks to all...

DirectOutputTest.jpg.fbb79989985c5e3da14d836d53d04e27.jpg

  • Like 1
  • jimmay3 changed the title to PinballX DOF Built-in Commands (Looking for a PinballX Exit/Shutdown Command) - SOLVED
Posted (edited)

Works great running it direct via PBX (No popup or extra windows to close), but not when running a batch file via PBX or from CMD Prompt or Shortcut, it always leaves the DOS screen up waiting on the user to type quit.  Any parameter or way to auto close it?  Can hide it a little with making the shortcut run minimized, but still have a window on the taskbar to close.  I'll have to make up a video or each...  Should just put the DirectOutputTest.exe always included in the main program, great utility.  Thanks again to all...

Here's the finial settings for PBX for a Light Test on Startup and Pins Stowed Up on exit...

image.jpeg.7cbb29ccd76902710507504b6aa91185.jpeg


@echo off
c:
cd\directoutput

:ROWS 1-4
directoutputtest.exe 2 1-3 255 sleep .2 1-3 0 9-11 255 sleep .2 9-11 0 17-19 255 25 255 sleep .2 17-19 0 25 0

:PINS RESET
directoutputtest.exe 2 26 255 sleep .5 26 0

:UP 1-10
directoutputtest.exe 2 1 255 sleep .2 1 0 2 255 sleep .2 2 0 3 255 sleep .2 3 0 9 255 sleep .2 9 0 10 255 sleep .2 10 0 11 255 sleep .2 11 0 17 255 sleep .2 17 0 18 255 sleep .2 18 0 19 255 sleep .2 19 0 25 255 sleep .2 25 0

UPDATED OPTIMIZED SETTINGS IN BOLD...

Edited by jimmay3
Settings Update
Posted

Maybe an idea to launch the directoutputtest.exe from a sepereate batch file.

your first batch file you setup in pbx, that will launch the batch file with the commands, but you fire it paralell, so it will not wait to fonish it. Wait in your first batch file a couple of seconds and kill the 2nd batch file from the main batch file.

Does that make sense ? 

Posted

Tried even calling it from a batch, still leaves the DOS window open with the utility prompt...  Not a big deal since PBX is perfect, hides all.  I just have the batch files on my desktop if I need to put pins up/down for any reason, definaitly not a deal breaker, you got it working great...

Posted

Here's the results with PBX and the light test and pins up/stowed on startup and exit...

 

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