Darkmeteor Posted July 15, 2013 Share Posted July 15, 2013 Just like a lot of people, I still have about 10% of my VP tables running these old B2S executables backglass because that's the only option right now. So I looked how it's done in fplaunch and made an autohotkey that will work with PinballX.Basically what it will do is look at the table filename, and if it's named "sometableB2S.vpt" it will try to close a running backglass. The table HAS to be named like that (finishing with "B2S.vpt") as it's exactly what the script will look for before trying to close a B2S. Really, it's just like fplaunch, so anyone who was using this feature from fplaunch will already have all his tables with the right names !It's a pretty simple autohotkey script, and it needs to be launched after the table exit with [TABLEFILE] as parameter, here's the content of the script :If 0 > 0{ StringRight, ending, 1, 7 if (ending = "B2S.vpt") { WinKill, Form1 }}I've added the ahk file as well as the compiled exe on my dropbox here : https://www.dropbox.com/sh/fg2ovlmtf08u6mi/viPoi3snby 1 Quote Link to comment Share on other sites More sharing options...
Tom Speirs Posted July 16, 2013 Share Posted July 16, 2013 Thanks for this.I just wanted to remind folks we have a fully featured download section on the forums so feel free to upload anything here. We also have the free FTP. There is no need to pay for or use separate services. Quote Link to comment Share on other sites More sharing options...
horseyhorsey Posted July 16, 2013 Share Posted July 16, 2013 Next time you setup a B2S table add the following at the bottom of a tables script.Sub Table1_Exit():Controller.Stop:End Sub(Table1 being the name of the table in visual pinball)I don't expect you to go through and do every table but mine have been setup like this since the start of directb2s and controller.stop closes the b2s. Quote Link to comment Share on other sites More sharing options...
Darkmeteor Posted July 22, 2013 Author Share Posted July 22, 2013 This only works with DirectB2S files. I'm talking about B2S executables, the old ones, which are only exiting when pressing the esc key. Not all tables have a DirectB2S yet, Cirqus Voltaire for exemple. Quote Link to comment Share on other sites More sharing options...
Lyanheart Posted July 22, 2013 Share Posted July 22, 2013 I have at least two tables that are using the b2s exe's instead of direct and I never had a problem with them not closing when launched from pinballx. If I launch direct from vp they can remain open, though. Circus Voltaire is one of them. I think my version of Gridiron is the old exe as well. 1 Quote Link to comment Share on other sites More sharing options...
evilantal Posted July 23, 2013 Share Posted July 23, 2013 Depends on what key you set for exit emulator, I guess (esc or something else) Quote Link to comment Share on other sites More sharing options...
Darkmeteor Posted July 24, 2013 Author Share Posted July 24, 2013 Yep evilantal, I'm not using esc and that's why I needed a workaround. Quote Link to comment Share on other sites More sharing options...
Lyanheart Posted July 25, 2013 Share Posted July 25, 2013 Ok, I get what's going on now. Didn't realize at first since it was one of the first things I changed to avoid exactly what you're going through.The easy solution is to use the ESC key as the b2s.exe's require, and also is the default for pinballX. Bind your exit/end button on your cabinet to ESC. In the vpinball Preferences>Keys menu, check the box "Disable ESC Key" to keep the little menu from popping up when trying to close out a table and mucking things up from within pinballX. When you are using vpinball directly (in the editor), you would press Q to bring up the exit menu and just hit ESC to close the b2s. This generally is not a problem since if you're running tables from vpinball itself, you should have a keyboard nearby.The alternative is to change the close/exit button for pinballX and the b2s exe's to match. Easily done for pinballX, but I don't know if you can do it for the b2s files, but your script takes care of it. Quote Link to comment Share on other sites More sharing options...
horseyhorsey Posted July 25, 2013 Share Posted July 25, 2013 Yes, my bad, CV is only table that seems to do this for me. Quote Link to comment Share on other sites More sharing options...
Rainman Posted July 26, 2013 Share Posted July 26, 2013 Next time you setup a B2S table add the following at the bottom of a tables script.Sub Table1_Exit():Controller.Stop:End Sub(Table1 being the name of the table in visual pinball)I don't expect you to go through and do every table but mine have been setup like this since the start of directb2s and controller.stop closes the b2s.Tried to put this at the end of my vpt table script but it doesn't work, old B2S backglasses still refuse to quit. Quote Link to comment Share on other sites More sharing options...
Joefon Posted December 4, 2018 Share Posted December 4, 2018 How can there be no answer or maybe there is but no one ever shares it... Quote Link to comment Share on other sites More sharing options...
Draco1962 Posted December 4, 2018 Share Posted December 4, 2018 Respond to necro posts much? Quote Link to comment Share on other sites More sharing options...
Outhere Posted September 1, 2020 Share Posted September 1, 2020 Answerhttps://www.vpforums.org/index.php?showtopic=15721&p=457697 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.