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

Recommended Posts

Posted

I'm still thinking of a script for Future Pinball that opens Future DMD only on tables that use it.

I think one way to do it would be based on whether there is a video with the name of the table in the DMD Videos folder.

But I don't know how exactly the script should be done.

If "C: \ PinballX \ Media \ Future Pinball \ DMD Videos \% 1% .mp4" exists then Run, "C: \ Future Pinball \ Future DMD.exe table =" [TABLEFILE] "close = 1"

Continue

If it does not exist, then continue

There is someone who knows how to make this script, it would be to put it as Launch Before.

Although I still think that without a doubt the best thing would be for PinballX to have in the settings for Future Pinball the fields for Furure DMD with its path, executable and parameters and later in the database a tag like <FutureDMD> True or False </ FutureDMD would be added >

Or that even without including these modifications it was done in a general way for all systems.

So databases on any system could be tagged <LaunchBefore> True or False <\ LaunchBefore>

Posted
1 hour ago, PcTeknic said:

Although I still think that without a doubt the best thing would be for PinballX to have in the settings for Future Pinball the fields for Furure DMD with its path, executable and parameters and later in the database a tag like <FutureDMD> True or False </ FutureDMD would be added >

Or that even without including these modifications it was done in a general way for all systems.

So databases on any system could be tagged <LaunchBefore> True or False <\ LaunchBefore>

This: 

 

Posted

Draco, what I'm asking for is a script to do it as launch before.

As a feature request I asked for it many months ago, more than a year and since this has not been put in PinballX, I ask for help to do it with a script.

Posted

The second half alluded to your initial enhancement request for it to be an integral component within PinballX.

As I have defined for you before, if you post about something that involves a change or addition to the functionality of PinballX, please post it in the correct thread.

If no response to your post in the Enhancements/Feature request thread, locate the link to your original post and create a new post and post the link and ask for an update or if it is possible.

It's really that simple. The place to "bounce" a request is where i directed you.

I have also previously noted, in so many words, that there are many features that have been requested that may never be found in PinballX for probably as many reasons. 

Posted

Yes %1% for tablefile parameter.

But also is valid script type:

If tablefile=xxxxxx then Run ......

If tablefile=xxxxxx then Run.......

I think one script based on tablefile name and if DMD Video is found no need edit script when you add a table.

But two ways are valids if work

Posted

Sorry, no pc yet around, but a batch file like this should properly work for you:

if exist "C:\PinballX)\Media\ Future Pinball\DMD Videos \%%1.mp4" ( cmd /c ""C: \Future Pinball\Future DMD.exe" table =""%%1""close = 1") else ( rem do when not exist)

Posted

It has not worked for me
I've been testing commands all afternoon and haven't gotten anything similar to work, neither as .bat nor as exe
Currently I have it like this:

;--------Run Before (Need to be compiled)----Start------

#SingleInstance force
SetTitleMatchMode 2
DetectHiddenWindows On
DetectHiddenText, On

table = %1%
xml_table = %1%

;--------Run Before (Need to be compiled)----End------
 
if exist "C:\PinballX\Media\Future Pinball\DMD Videos\%1%.mp4" Run, "C:\Future Pinball\FutureDMD.exe" table="[TABLEFILE]" close=1
if exist "C:\PinballX\Media\Future Pinball\DMD Images\%1%.png" Run, "C:\Future Pinball\Sripts\Image_Monitor_View" 2 "C:\PinballX\Media\Zaccaria Pinball\DMD Images\%1%.png"

Process, WaitClose, Future Pinball.exe
;--------Run After (Need to be compiled)----Start-----

Run, taskkill /IM FutureDMD.exe
Run, taskkill /IM Image_Monitor_View.exe

ExitApp
 

Posted

Sorry, copy/paste make a mess of it

This is an test I just did, just replace your values :
 

@Echo off
set strVideo=%1
set strVideo=%strVideo:"=%
if exist "C:\Pinball\PinballX\Media\Visual Pinball\DMD Videos\%strVideo%.mp4" goto found
GOTO :Notfound

:Found
ECHO FOUND
GOTO EOF

:Notfound
ECHO NOT FOUND
GOTO EOF

:EOF

 Output :

C:\Users\mike>test "Abra Ca Dabra (Gottlieb 1975)"
FOUND

C:\Users\mike>test "Abra Ca Dabra (Gottlieb 1975)1"
NOT FOUND

The Videoname needs to be between double quotes given to the cmd file (I called it test.cmd) 
So first hit send you to found and next sends you to not found.
you can put all your logic under to :found or :Not found 
This is the same as :

@Echo off
set strVideo=%1
set strVideo=%strVideo:"=%
if exist "C:\Pinball\PinballX\Media\Visual Pinball\DMD Videos\%strVideo%.mp4" (echo Found) else (echo not found)

I don't have future pinball, so I tested it with my paths . 
 I hope this make sense and now you are able to find a video and launch it with future dmd.exe or with imageviewer

  • Thanks 1
Posted

A lot of thanks for your help Mike.

After 3 hours doing tests it still doesn't work.
Sometimes I have managed to open Future DMD, but it opens whether there is a video or not.
At other times it opens both things, Image_Monitor and Future DMD, leaving Furure DMD above Image_Monitor.
On the other hand. I have not managed to get Image_Monitor to display the corresponding image, it opens but is blank, despite the images being in the correct path, with the correct format and name and having tried several commands% 1, %% 1,% 1%
I currently have the script in a .bat like this:

------------------------------------------------------------------------

; Script de gestión selectiva de Future DMD por Mike_da_Spike
; Script basado en si encuentra video o no en las carpetas de medias de PinballX
; Los vídeos deben estar en formato MP4 en la carpeta de DMD Videos con el nombre de la tabla
; Se debe enviar el parámetro [TABLEFILE] a este script
@Echo off
set strVideo=%1
set strVideo=%strVideo:"=%
set strImage=%2
set strImage=%strImage:"=%

if exist "C:\PinballX\Media\Future Pinball\DMD Videos\%strVideo%.mp4" goto DMD
if exist "C:\PinballX\Media\Future Pinball\DMD Images\%strImage%.png" goto NODMD

:DMD
(cmd /c ""C:\Future Pinball\FutureDMD.exe"")
GOTO EOF

:NODMD
(cmd /c ""C:\Future Pinball\Scripts\Image_Monitor_View.exe" 2 "C:\PinballX\Media\Future Pinball\DMD Images\%2.png"")
GOTO EOF

:EOF

-----------------------------------------------------------------------------

I have also tried in various ways with a SelectDMD.ahk which I later compile as EXE.

The Parameter that I give PinballX for Launch Before in all cases is [TABLEFILE]

I don't know what else to try.

Posted

You getting almost get there (sorry mate it take sol long)

Lets start with a small batch course :)
if you run the batchfile (lets call it fb.bat) the parameters behind are in order (with a space in between

 

FP.Bat 1 2 3 4

So %1=1, %2=2, %3=3 etc
If you have just 1 parameter (Let say [Abra ca Dabra (gottlieb 1975)] and you don't put double quotes behind it, you will have 5 parameters
 

FP.bat Abra Ca Dabra (Gottlieb 1975)

So, 
%1=Abra
%2=Ca
%3=Dabra
%4=(Gottlieb
%5=1975)

but you want to check the complete file name, so you do :

FP.bat "Abra Ca Dabra (Gottlieb 1975)"

This is just 1 parameter. So %2 will never be filled

So to ckeck if a video exists or a picture :

@Echo off
set strCheck=%1
set strCheck=%strCheck:"=%

if exist "C:\PinballX\Media\Future Pinball\DMD Videos\%strCheck%.mp4" goto DMD
if exist "C:\PinballX\Media\Future Pinball\DMD Images\%strCheck%.png" goto NODMD
Rem nothing found
GOTO EOF

:DMD
cmd /c "C:\Future Pinball\FutureDMD.exe"
GOTO EOF

:NODMD
cmd /c "C:\Future Pinball\Scripts\Image_Monitor_View.exe" "C:\PinballX\Media\Future Pinball\DMD Images\%strCheck%.png"
GOTO EOF

:EOF

(and if nothing is found, just go to EOF after that)
EDIT: I copied your lines for DMD and NON DMD, but both won't launch a table name !
NODMD will only launch image viewer and DMD launches FutureDMD will launch, but without table. So adjust the launching part 

 

Posted

Thanks Again Mike.

This afternoon I will be able to test it, to see if there is luck, because I have tried more than 20 ways.

I understand that this script text I put in a .bat file and in PinballX I put that .bat file as Launch Before with parameter [TABLEFILE] and wait to continue in NO.

It seems to me that the monitor for Image_Viewer would be missing

@Echo off
set strCheck=%1
set strCheck=%strCheck:"=%

if exist "C:\PinballX\Media\Future Pinball\DMD Videos\%strCheck%.mp4" goto DMD
if exist "C:\PinballX\Media\Future Pinball\DMD Images\%strCheck%.png" goto NODMD
Rem nothing found
GOTO EOF

:DMD
cmd /c "C:\Future Pinball\FutureDMD.exe"
GOTO EOF

:NODMD
cmd /c "C:\Future Pinball\Scripts\Image_Monitor_View.exe" 2 "C:\PinballX\Media\Future Pinball\DMD Images\%strCheck%.png"
GOTO EOF

:EOF

 

Posted

Don't give up mate !
not sure what you mean with :

2 minutes ago, PcTeknic said:

It seems to me that the monitor for Image_Viewer would be missing



 

 

Posted
Image_Monitor_View.exe" 2 "C:\PinballX\...

Image_Monitor_View.exe" 2 "C:\PinballX\...

2 to show image in 3rd monitor

Usually 0 playfield, 1 backglass and 2 DMD
Although it depends on the display configuration.
In my case it is 2 and opening it opened, but blank, because neither% 1, nor %% 1, nor% 1% gave me results.
Now I hope that with %strCheck% .png it will work

Posted
18 minutes ago, PcTeknic said:

Image_Monitor_View.exe" 2 "C:\PinballX\...

Image_Monitor_View.exe" 2 "C:\PinballX\...

2 to show image in 3rd monitor

Usually 0 playfield, 1 backglass and 2 DMD
Although it depends on the display configuration.
In my case it is 2 and opening it opened, but blank, because neither% 1, nor %% 1, nor% 1% gave me results.
Now I hope that with %strCheck% .png it will work

gotcha ! Sorry, think I removed it. I'm not able to test. Don't use imageview or future pinball. Just try to help you with this mate

Posted

Easy, I just wanted to make sure, never look for mistakes.
In a little while I will be able to prove it.
If it were necessary to change the names of the database, there would be no problem, if instead of having names such as 007 Bond 50 (Original 2013) it favors somewhat in the face of the script that the table name is of the type Bond50 would make the necessary renames.

Do you think that can influence?

Posted
21 minutes ago, PcTeknic said:

If it were necessary to change the names of the database, there would be no problem, if instead of having names such as 007 Bond 50 (Original 2013) it favors somewhat in the face of the script that the table name is of the type Bond50 would make the necessary renames.

Do you think that can influence?

Not following you, but if you use a batch file, the naming in the database must be exact the same as the filenames of the video's pictures and tables

Posted

No, dont work.

Before open the 2 programs, FutureDMD and ImageMonitor at same time.

Now don´t open anyting

I think that it fails in the search and always goes directly to the end, to :EOF, to do nothing.

 

Posted

I believe that it does not do the search or does not find what it is looking for and it passes in the end, executing nothing.

I've also tried to limit the search to the video, if it finds it open FutureDMD and if it doesn't find it open Image Monitor, but it only opens the image if I put - system -.png it doesn't work with what I send the parameter [TABLEFILE]

Posted

You could also try it directly by the table names:

Commands to understand the tablefile parameter

if tablefile = "abracadabra" command to open Image Monitor with abracadabra.png

if tablefile "gremlins" command to open FutureDMD

I have tried 10 or 12 of that style and neither.

I wouldn't mind creating one line for each table if it works.

Posted

Future DMD does not need to give commands, just open before the table and it will show what the table to open commands.
When both programs opened, it misused the DMD.
And closing it is closed by the Launch Afer that has two commands, close Future DMD and close Image Monitor.
Lauch After works well.

Posted

Try passing parameter as [TABLEFILEWOEXT] rather than [TABLEFILE]

I think the batch might be looking for a video named  e.g. 'tablename.fpt.mp4'

  • Thanks 1

Join the conversation

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

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