Sign in to follow this  
Followers 0
natetaco

How To Add Script To A Table

9 posts in this topic

First off I am running 3 screens. I have been having trouble with one backglass hiding the dmd on my 3rd screen when it loads. Have tried various things with no luck. I can press f5 twice and the dmd will appear as it should. So basically I am asking how to script a table (totan) so that it automatically presses f5 twice after everything has loaded? I found this script that gigulla used to fix a similar problem with Apollo 13. But no matter how I put it in the script I get an error. Anyone have any what I am doing wrong? Thanks.

Here is his quote:

While you are playing table try to press F5 this will force Double Size of DMD screen and force VPinMame screen to display on top of all screen by the same time, then press F5 again to resize to original position. the screen should be on top now.

AHK code if needed you call this soon as the table is launched add this small part of code .... I use this to fix DMD under screen issue like for apollo13. DirectB2S 3screen

;----

Sleep 500

Send {f5 down}

Send {f5 Up}

sleep 500

Send {f5 down}

Send {f5 Up}

;-----

Below is a picture of what my 3rd screens looks like when displayed correctly. Really like how the score box renders and changes colors on my 3rd screen. Any help is greatly appreciated. Thanks again.

post-1807-0-58977200-1447512076_thumb.png

Share this post


Link to post
Share on other sites

You'd set a time that could watch for the state of a light on the table and when that light comes on, it executes a vpmkeydown command. F5 key in Vpinmame is 63 

AHK scripts wont work on a VP table though... I have something similar built into Kingpin. Set a time to monitor a light that comes on when the table is ready to play, maybe light 1?

 

Sub timer1_timer

if light1.state = 1 and IsStarted = 0 then start2.enabled = 1

end sub

 

Sub start2_timer
IsStarted = 1
vpmKeyDown(63)
vpmKeyUp(63)
vpmKeyDown(63)
vpmKeyUp(63)
start2.enabled = 0
End Sub
 
This might work? You need to add two timers, timer1 is on with a timer interval of 10. start2 is off with a timer interval of 10. I'm guessing on the vpmkeydown script, I've never scripted a keypress so that may be wrong

Share this post


Link to post
Share on other sites

Thanks for the response. I tried the script you gave me and it did not give me any errors but it did not solve my problem. Thanks for trying. It may be that the timer may need to be longer. Maybe if I describe what I am doing in more detail you could continue to help.

I am trying to run Bassiege's Totan backglass on 3 screens. It will work if I set the backglass to standard hidden visible, but by doing this I lose the awesome color changing Williams score box on the 3rd screen and just get the dmd. If I set it to standard standard visible I get the dmd first then after a couple of seconds the score box loads covering up the dmd. This is because the backglass takes longer than normal to load.

If you haven't downloaded this version of the backglass, you should. His take on this backglass has to be seen. Being a table builder you would admire the work he put into it. I spoke with Bassiege and he has only 2 screens, so I know it was not made for 3 screens, but I can get it to work with alt+tab, but use f5 twice because it is so much easier. Just was hoping for a "work around".

Thank you fren for all your hard work. We have all of your table recreations on our cab and enjoy them all. WPT would be my personal favorite. Please keep up the great work. You are definately talented and an asset to this wonderful hobby. Thank you so much for your contributions.

Share this post


Link to post
Share on other sites

Just to break in here. I worked with Bassiege on testing the TOTAN as it really pushes my hardware to the limit. 

 

i5 3570k @ 3.4 GHz (no overclocking)

8Gb DDR3 RAM

NVidia GTX 660 2Gb VRAM (no overclocking) - all three screens are connected to the one card

 

I can get it to work, but I do have to slow down animation frames to 3X in order to gain control over the settings dialog. I don't run the B2S third screen false grill which may even place a bigger load on the video system.

 

First, I'd just adjust animations all the way down to 10X and don't run the third screen at first. 

 

Second, the ahk script only attempts the F5 keypress after 500ms (half a second). It takes a lot longer than half a second for this monster dB2S to load. I'd set that delay to something ridiculously long like 30000ms and start shortening the delay by trial and error. Then start adding animation frames back and making the third screen dB2S visible.

 

Do you use PinballX as a front-end? I don't run into this sort of issue launching through PinballX. It seems to be pretty good about keeping the right processes in focus. I have a similar issue running Sparky70's TAF dB2S with the THING lights on the third screen when I launch in Windows outside of PinballX. I have to Alt+Tab to make the DMD visible. Within PinballX, the DMD pops on top of the dB2S like it is supposed to. If you are not running PinballX, then you might give it a try.

Share this post


Link to post
Share on other sites

Carny

Feel free to break in. Thanks for your info. My specs are exaclty like yours not sure what # i5 I have, wife is playing ATFM right now , but I'll look. Run the 660 overclocked and voltage up. No sync or boost enabled. My system runs 800+ fps on totan with this backglass and plays as well as others on our cab. I do run 1920 on the pf, backglass and dmd are set at 1024 x 768. I am running hyperin (no admin.) with 197 VP tables but have no idea what an ahk file is... but I did build the cab (no led wiz) our friends and family play on. Its a very basic cab, from what I have seen others do. Everything plays really good if I had to pick a table that comes close to hammering my system it would be TFTC with Bassieges crazy backglass....kinda makes ya dizzy. I would be glad to help if totan is giving you stutter. If you would like to go over our settings, let me know. I'd be glad to help. I'll try what you said when the wife is done with the martians..... Thanks for your help, I do appreciate it.

Share this post


Link to post
Share on other sites

Maybe a dumb question, but how do I make the timer longer? If I use gigullas script I get errors and don't know why? Or are you talking about frens script? You are exactly right if I could get the key press to happen much later it should work fine, just confused on the timer and which one.

Also TAF works fine. The thing lights and dmd all render on my 3rd screen. But this backglass doesn't take anytime to load the problem I'm having is because totan takes a couple of seconds to load. Here's a picture of TAF. I think TAF looks great with the thing lights on the dmd.

Thank you for taking the time to help, I do appreciate it.

post-1807-0-77707300-1447598642_thumb.png

Share this post


Link to post
Share on other sites

The script requires AutoHotkey to run or to compile an executable that will run on its own.

 

http://ahkscript.org/

 

Sleep is an instruction that pauses execution of the script for a set period of time. The units are thousandths of a second, so what is in the script you have delays sending keypresses for 500 units or half of a second. You can make the delay longer by making the number larger: 1,000 would be 1 second, 10,000 would be 10 seconds, 30,000 would be 30 seconds.

Share this post


Link to post
Share on other sites

Thanks a lot. I'll check it out. Never compiled anything, but I'll read up on it and figure how when I have time. Just thought it could be scripted into the table. Got the whole timer thing now, thank you for taking the time to help me out. Nate

Share this post


Link to post
Share on other sites

I do not upload the new versions here until they are save. Everyone who experienced the described problem is ecouraged to help and test. Thanks! (http://www.vpforums.org/index.php?showtopic=32142&page=2&#entry385337)

Now every option is laying on the table. After more thinking I found out that there are two ways to include a third screen.

 

Natetaco posted that he had the same problem with other rare db2s too. That could be a small editor bug in case the problem would be solved with the new version 1.92 for three screen users. Your feedback is very much appreciated!

 

The other hint came from Zozueh and is described above and is probably only a misunderstanding of the backglass server.

You should try to deactivate for the normal grill usage the b2s dmd as hidden in the b2s backglass server. Try to use version 1.90 or 1.92.

 

To finally solve this problem I uploaded three new versions.

 

1.91 for users which are unable to solve the described problem regardless what solution they try. (You will miss all grill and third screen lightning effects.)

 

1.92 for users with 3 screen overlay dmd problems. Does it work? --> Your feedback is very much appreciated!

 

2.0 as version for future improvement room. If none does have problems with it, I think about how to restore the grill and 3 screen lightning effect also for this version.

 

Now it is up to you, your feedback is very much appreciated!

 

It is important for the future to solve this issue now!

http://www.vpforums.org/index.php?showtopic=32142&page=2&#entry385337

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0