Jump to content
LaunchBox Community Forums
twobucks

Pause Screen Visual Pinball issues

Recommended Posts

Not sure why it's looking for AutoHotkey.ahk.   

Drag you VPX.ahk onto AutoHotkey.exe and see if there's a beep.

Share this post


Link to post
Share on other sites
Posted (edited)
10 minutes ago, JoeViking245 said:

Not sure why it's looking for AutoHotkey.ahk.   

Drag you VPX.ahk onto AutoHotkey.exe and see if there's a beep.

No beep. But I can here a quick low volume hum then thud ... meaning, I can hear the speaker make a slight sound like it is activated then shuts down.

Edited by ItchyRobot

Share this post


Link to post
Share on other sites

Volume's up?  Hearing aid batteries fresh?  Got the audio piped through the sub woofer on the stereo? lol   OK, so the sound idea for some reason isn't going to work.   BUT!!!!!!!!!!!!!............ we know (at least we think we do) the script and AHK work.

Oh snap!  Uh... try changing "100" to "1000" in the 1st SoundBeep line and do the drag and drop thing.

Share this post


Link to post
Share on other sites
1 minute ago, JoeViking245 said:

Volume's up?  Hearing aid batteries fresh?  Got the audio piped through the sub woofer on the stereo? lol   OK, so the sound idea for some reason isn't going to work.   BUT!!!!!!!!!!!!!............ we know (at least we think we do) the script and AHK work.

Oh snap!  Uh... try changing "100" to "1000" in the 1st SoundBeep line and do the drag and drop thing.

Bam! I got one long beep... 2 secs or so

Share this post


Link to post
Share on other sites
6 minutes ago, JoeViking245 said:

Set the 2nd SoundBeep to the same thing, and try AC/DC (or whichever table) again.

nothing  =(
 

#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,1000,1000

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

WaitedTooLong:
Exit

 

Share this post


Link to post
Share on other sites

do i need to set the path the autohotkey.exe path somewhere? Or is that assumed since it came with the Launchbox installation?

Share this post


Link to post
Share on other sites
Posted (edited)

LB knows where to look for [it's own copy of] AHK.   But based on where you said it was located  ../LaunchBox/AutoHotkey/autoHotkey.exe  , you're not on the latest beta version.  Which shouldn't make any difference.  More of a comment than anything.

So you heard the beep when you drag-drop the script onto AutoHotkey.exe.  But when you start a table that has the "Addition App"  [the script] , you don't hear any of the beeps.  Not even the 1st one.  That's saying.... well... the script is not being ran at all.

I think you said you have the Full AutoHotkey program on your "Z" drive.  (again, makes no difference as long as LB has its' copy).  In the Full version, there should be a sub-folder called "Compiler".  In there, run "Ahk2Exe.exe".  Point to the script ("Source") file, set the destination (same folder or wherever), then click ">Convert<".  Now go to Additional App and point to the new .exe file (instead of the .ahk file).   Try the table.

If I mis-read and you don't have the Full AHK, never mind.  Just press your Start button when you see the popup [PinMame] window. lol

Edited by JoeViking245

Share this post


Link to post
Share on other sites

I don't think the script is being run at all when I open a table. Also, I do not have the full version of autohotkey installed... only what came with Lanchbox. I should be updated to the latest official build of Launchbox, by the way (non-beta).

I think I'm just going to click the damn button myself

Thanks for joining me in this wild goose chase. 😃 I least I learned my Autohotkey does not work. Should I report this as a bug?

Share this post


Link to post
Share on other sites

Just had an epiphany...  It might be working on mine because I have Full AHK installed and the when you add an Additional App, there's a reason that it defaults to looking for an executable file... LB doesn't run ahk scripts in this manner.

Remove that Additional App from you table(s) and save.  Go to "Tools", "Manage Emulators" and double click your Visual Pinball X emulator.  Click on the "Running AutoHotkey Script" tab and in the blank area, paste the code

#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,1000,1000

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

WaitedTooLong:
Exit

Note: I changed the Sleep line back to 3 seconds.  Now Save and run a table.  Oh, and make sure the volume's up. ;) 

Share this post


Link to post
Share on other sites

@JoeViking245

That worked. I hear two beeps now, two different tones. Though, I have a feeling this will not work since each table loads at different times due to how complex the design is. It will probably have to be individual timings for each table. That could be a lot of work figuring out the perfect timings.

Share this post


Link to post
Share on other sites

Woo Hoo!!!!  So you heard the 2 beeps.  Did the popup go away [sooner than usual]?  

To get it to work differently for different tables, I see 2 options.

1 - Create multiple VPX emulators (as above) with different delay ("Sleep") times.  Then find which delay time works best for each table and assign that respective emulator to that table.

2 - Download/install the Full AutoHotkey program, add the script (like our 1st feeble attempts) to each and every table [that uses PinMame] and adjust the delay time accordingly.  (Optionally, with the Full AHK installed, compile each script to an .exe)

..Both of which would be a p.i.t.a. depending on how many tables you have.

Plan "B" would be to settle for a happy medium, like maybe 4.5 seconds (4500).

Share this post


Link to post
Share on other sites
Posted (edited)
2 hours ago, JoeViking245 said:

Woo Hoo!!!!  So you heard the 2 beeps.  Did the popup go away [sooner than usual]? 

I did not the first time... just made two beeps, then the normal pinmame splash screen. Then it worked the second time without me changing anything. So, I think the splash screen timing depends on the PC load... maybe it had things running in the background or something... who knows.

Now I just need to play with the times a bit, like you said, to find a happy medium. If that doesn't work, then it's back to, god forbid, pressing the button at the splash screen! 😃

 

Edited by ItchyRobot
  • Like 1

Share this post


Link to post
Share on other sites

My inner-Geek said our proposed 'solutions' were unacceptable.   Place this inside your VPX emulator "Running AutoHotkey Script" tab.

Done = 0
SetTimer, WaitedTooLong, -15000
While (!Done)
{
  WinGet, numOpen, count, ahk_exe vpinballx.exe
  if numOpen = 3
  {
     send, s
     Exit
  }
}
WaitedTooLong:
Exit

 

  • Thanks 1

Share this post


Link to post
Share on other sites

I like your perseverance. And it paid off !!!
I just tried about 10 tables and it worked great for all of them but "The Flintstones". But that one is a known long loader - it must have a bunch of code or graphics compared to the other tables.

Thanks for taking so much time figuring this out. Hopefully it is something you will use in your build too.

Share this post


Link to post
Share on other sites

@JoeViking245 curious if you have preferred setting for the pause and exit.  I have a single button setup for pause  and a single for exit on my arcade cab.  When i pause, the pause screen shows, but the table is still running. tried the suspend emulator when paused but that didnt seem to work right.

Share this post


Link to post
Share on other sites

You're Welcome!  And it's nice to see 'the fix' can be replicated on someone else's machine. :)  Also, it appears I haven't checked on my tables in the last 6 months as I still only had Flintstones for VP9. :$

The 'updated fix'.... increase the timeout period.  Right now it's set to 15 seconds (-15000).  Go ahead and set it to.. heck, I don't know... 60 seconds (-60000).  Seems that even with this longer loading time, the PinMame banner is still the 3rd iteration of vpinballx.exe.  So as soon as it sees it the 3rd time, it'll send the key and exit.  Otherwise, in 60 seconds it'll say "I've waited too long.  I'm outta here".

And definitely!!!!... it will be used in my cab now too! 👍

Share this post


Link to post
Share on other sites

honestly, not 100% sure.  my gut says no. i think my issue may be the default BB/LB controls.  i dont use the combo for those features.  Button brings up the pause menu just fine and pauses just about all emulators, but those allow you to redefine the pause key if necessary.  Since Esc is the default VPX pause key, i think that is why it isnt working since LB uses that as the default exit, correct?

Share this post


Link to post
Share on other sites
Posted (edited)

@JoeViking245 making it -60000 worked. All is perfect now

@ed20910 I use a single button Pause... I was actaully having issues trying to use a 2-button combo for BigBox pause. It was hit and miss when it would work, so I reverted back to a single button and have had no issues since.
From what I understand, VPX does not have a true pause. I just wait until I gutter ball, or get a hold with the flipper... then hit pause.

Edited by ItchyRobot

Share this post


Link to post
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
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...