Jump to content
LaunchBox Community Forums

Pause Screen Visual Pinball issues


twobucks

Recommended Posts

Has anybody gotten Visual Pinball 10.x in desktop mode working with launchbox pause screens?  I have gotten the pause screen to work but when returning to the game to resume playing, the playfield is out of focus and i have to ALT-TAB to bring it back into focus.  Does anybody have an tips for getting the focus to return to the game instead of the visual pinball menu?

Link to comment
Share on other sites

It seems to be random that it does this, maybe depending on the table/DMD/PinMame... who know's.  Also, looks like after the 1st time of needing to {Alt}{Tab} back to the table after pausing, it works fine.  I think it's just a thing but adding this to the On Resume tab for the Visual Pinball X emulator seems to fix it.

WinActivate ahk_class VPPlayer

image.thumb.png.f18b69459b31f05761de970ba7e8c237.png 

 

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

It shouldn't crash anything.  All it's doing is a pseudo hold-down {Alt}, hit {Tab} until you get to the VPX table window and release {Alt}.

That said, just did some more testing and found on a table that uses Virtual DMD (UltraDMD.exe) it will pause, but when I go to un-pause I get a message something like 'VPX just had a brain fart. Do you want to close it or wait to see if its' head clears out?'  Clicking Wait seemed to... well, just wait.

From this, I found if I {Alt}{Tab} to the DMD window and hit P[ause], it resumes just fine.  I only have 5 tables that use UltraDMD (as far as I can tell) and only 2 of those had this happen.  BUT!!!!!!!!............ when I went back to double check those, they un-paused just fine.  So, I'll say it again.  It seems to be random. :) 

And to top that off, I removed the 'WinActivate' line mentioned above, and all other tables return properly back to the play field now after pausing.  Go figure.

 

So maybe don't use the aforementioned line.  Play, Pause, Un-Pause, {Alt}{Tab} back to the play field,  Exit, Play, Pause, Un-Pause, {Alt}{Tab}, Exit and so forth then maybe after a while it'll clear itself up.?

Link to comment
Share on other sites

Thanks JoeViking245

Adding the AHK script as shown in your first post worked out great in bigbox mode.  I can confirm this does work for VPX 10.6 at least for tables that don't require UltraDMD.  My VPX setup is in fullscreen windowed mode so i don't know if this will work on fullscreen exclusive mode. I also have force pause screen enabled but not sure if that really makes a difference or not.

now onto finding all the pinball instruction cards to add into launchbox/bigbox.

Thanks again!!

Edited by twobucks
Link to comment
Share on other sites

Glad it's working! 

Here's where I've gotten my instruction cards from.  http://www.pinballrebel.com/pinball/cards/

Pre LaunchBox, I was modifying the tables script files so that when I pressed a certain key, the instruction card would popup in a window.  Though that was quite a while ago.  Adding those to the ..\Manuals folders would be much easier. :)  Get real crazy and modify the pause xaml file so that the current tables I-card would show up on the right half of the screen. 

Edited by JoeViking245
Link to comment
Share on other sites

I copied and modified the default pause screen. Fairly easy to do.

Now the instruction card shows up in the same spot as the "arcade controls" image for the arcade games platform. I just copied the arcade.xaml and renamed it to Visual Pinball under a new pause theme. Then i changed my background image priorities to have the backglass image behind everything.

  • Game On 1
Link to comment
Share on other sites

On 1/25/2020 at 5:53 PM, JoeViking245 said:

Glad it's working! 

Here's where I've gotten my instruction cards from.  http://www.pinballrebel.com/pinball/cards/

Pre LaunchBox, I was modifying the tables script files so that when I pressed a certain key, the instruction card would popup in a window.  Though that was quite a while ago.  Adding those to the ..\Manuals folders would be much easier. :)  Get real crazy and modify the pause xaml file so that the current tables I-card would show up on the right half of the screen. 

Anyone want to upload their collection of Instruction Cards and /or manuals for their pinball tables? ... and also these modified pause themes!

Edited by ItchyRobot
Link to comment
Share on other sites

  • 1 month later...
On 1/24/2020 at 10:14 AM, Krakerman said:

This just froze everything for me and vpx crashed. 

@JoeViking245
It froze for me too. Actually froze when on the pause screen... It acted like it was a focus issue, though alt tab'ing didnt work. I ended up trying to alt tab, then eventually a window popped up asking to wait for VPX or close it. This happened on two occasions until I tried to change up some settings.
 

I ended up unchecking the box next to "Suspend Emulator Process When Paused"
This seems to have fixed the freezing/crashing.
FYI - I am in desktop mode for VPX and Retr808's Game Controles pause theme.

This is nice to have working. I can now pause a game then select to view my Manual where I store the Instruction Cards. Though, to close the Instruction Card PDF, I have to remember to select the button I have for 'back' in BigBox and not Escape key. Escape key makes the entire table reboot.
 

 

Edited by ItchyRobot
  • Like 1
Link to comment
Share on other sites

  • 3 weeks later...

@ItchyRobot That is a very nice discovery!!  As I was checking this out, I found it doesn't have to be the 'Start' button.  Space bar works also. :) 

Copy and save this AutoHotkey script (call it VPX.ahk or whatever) and set it to run as an Additional App for your tables (doesn't matter if they use PinMame or not because it will timeout (after 10 seconds) on it's own) and have it run Before Main Application.

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

Done = 0
SetTimer, WaitedTooLong, -10000
While (!Done)
{
	WinWait Preparing Table
	Sleep, 3000
	Send {Space}
	Exit
}

WaitedTooLong:
Exit

If you see the PinMame screen up too long, adjust the line:  "Sleep, 3000".  That is, if the screen shows for the same duration as is always had, it might be sending {Space} too soon. So try maybe "Sleep, 4000"  (4 seconds).  If it shows and goes away, but could go away a little sooner, try something like "Sleep, 2500".

Your mileage may vary.

Edited by JoeViking245
Link to comment
Share on other sites

5 minutes ago, JoeViking245 said:

@ItchyRobot That is a very nice discovery!!  As I was checking this out, I found it doesn't have to be the 'Start' button.  Space bar works also. :) 

Copy and save this AutoHotkey script (call it VPX.ahk or whatever) and set it to run as an Additional App for your tables (doesn't matter if they use PinMame or not because it will timeout (after 10 seconds) on it's own) and have it run Before Main Application.


#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

Done = 0
SetTimer, WaitedTooLong, -10000
While (!Done)
{
	WinWait Preparing Table
	Sleep, 3000
	Send {Space}
	Exit
}

WaitedTooLong:
Exit

If you see the PinMame screen up too long, adjust the line:  "Sleep, 3000".  That is, if the screen shows for the same duration as is always had, it might be sending {Space} too soon. So try maybe "Sleep, 4000"  (4 seconds).  If it shows and goes away, but could go away a little sooner, try something like "Sleep, 2500".

Your mileage may vary.

Sorry, I am still a noob with these more advanced features in Launchbox/BigBox. I assume I just need to copy/paste that code into a .txt file then rename it VPX with an extension of .ahk. Though I don't know what you mean by ... "set it to run as an Additional App for your tables". Can you further explain this in layman's terms. Thanks!

 

 

Link to comment
Share on other sites

Yes.

16 minutes ago, ItchyRobot said:

copy/paste that code into a .txt file then rename it VPX with an extension of .ahk.

Just make sure it doesn't save as "vpx.ahk.txt".

Then go into "Edit Game", click the "Additional Apps" tabs, then click "Add Appplication..."image.thumb.png.db340d4335e5b9baf9c754fd6a2a3257.pngimage.thumb.png.1bb12983ef7ca8a08214b8d4e5e67846.pngNow give it a name (whatever you want), "Click Browse" and go to where you saved the .ahk file.  You'll need to click right above the "Open" button and change "Applications.." to "All Files (*.*).image.png.8e9180fe3acfc790e6ab6fe436cf9539.pngimage.png.662fb24af16238abd0b376dd761b6d50.pngClick your file and click "Open".

Check "Automatically Run Before Main Application" and click "OK".

Edited by JoeViking245
Link to comment
Share on other sites

@JoeViking245

Thanks for the detailed instructions... I see AutoHotKey.exe in the following folder...
Z:\LaunchBox\AutoHotkey
I assume I do not need to install it; but rather Launchbox/BigBox uses it to activate the script. Correct me if I am wrong.



It looks like I have a "Z:\LaunchBox\AutoHotkey" folder, so I used that path instead of what you showed.... you had a "Thirdparty" folder ahead of the "AutoHotKey" folder. Mine does not.

My path = Z:\LaunchBox\AutoHotkey\MyAHKs\VPX.ahk

I also edited the .ahk file to send "s" instead of space, due to my arcade button setup.

With these changes, I could not get it to work. My pimame splash screen does not show up until about 9-10 seconds (timed with stopwatch); so I tried to edit the scrip accordingly to but did not have any luck.

Any ideas on what to try?

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

Done = 0
SetTimer, WaitedTooLong, -15000
While (!Done)
{
	WinWait Preparing Table
	Sleep, 9000
	Send {s}
	Exit
}

WaitedTooLong:
Exit

 

Edited by ItchyRobot
Link to comment
Share on other sites

Correct. You do not need to install AutoHotkeys.  And the path where you placed you VPX.ahk file doesn't really matter (future reference).  As long as you're telling LB a correct location.  

Add in the "SoundBeep" line right below the "WinWait" line.  [Save it. Run a VPX table in LaunchBox that you have the script listed as an Additional App.]  Count the number of seconds after you hear the beep until you see "the screen".  That's the number of seconds you need on the "Sleep" line.

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

Done = 0
SetTimer, WaitedTooLong, -15000
While (!Done)
{
	WinWait Preparing Table
	SoundBeep,,750
	Sleep, 9000
	Send {s}
	Exit
}

WaitedTooLong:
Exit

If you don't hear a beep, then we have other issues. :) 

Link to comment
Share on other sites

3 minutes ago, JoeViking245 said:

Can you show a screenshot of you "Add Application" window?   (Get to that window, press ALT + PrintScreen buttons.  Come back here and in your reply, press Ctrl + V)

image.thumb.png.939b33f4c7bf2836f8c50a0a92f36cf0.png

I assume you meant, edit application, since I already have it made.

Link to comment
Share on other sites

lol   Ya, I just scrolled up above and used that screen title.

I assume you used "Browse..." to find your ahk script instead of typing in that path.

Let's add in another beep and see if you hear it.

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

SoundBeep,100,1000

Done = 0
SetTimer, WaitedTooLong, -15000
While (!Done)
{
	WinWait Preparing Table
	SoundBeep,,750
	Sleep, 9000
	Send {s}
	Exit
}

WaitedTooLong:
Exit

 

Link to comment
Share on other sites

Join the conversation

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

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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...