Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: Howards Pinball Wrapper and Mala question  (Read 10428 times)

0 Members and 1 Guest are viewing this topic.

nussmier

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 45
  • Last login:November 06, 2018, 08:03:23 pm
  • I want to build my own arcade controls!
Howards Pinball Wrapper and Mala question
« on: November 19, 2007, 12:03:45 pm »
I recently installed visual pinball and pinmame and got them working no problem.  I can play the few tables I have with no problem through visual pinball.  I then downloaded the wrapper program(i think 5.11 is the version I got) and extracted its content into the tables folder.  I then ran the wrapper just to test it out.  It shows the tables in the list but if I try to run one I just get the Don't do drugs splash or steal pinmame roms splash screen and it freezes.  Very difficult to exit or anything.  I end up having to restart.   I also am unable to run visual pinball games from Mala.  I am suspecting this is due to the first issue but I have mala pointed to Howard's and have changed the command line.  When I try to run a table from mala it just flashes starting game then nothing happens.  I just end up back at the game list screen in Mala.  Like I said I am guessing this has something to do with the wrapper issues above but any help would be appreciated.
Thanks

Mike
 

Necro

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1031
  • Last login:November 29, 2022, 08:22:22 pm
  • Building a 'Classic' MAME Cab
Re: Howards Pinball Wrapper and Mala question
« Reply #1 on: December 12, 2007, 10:36:05 pm »
Having the same issue...no help from anyone on this?

unclet

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3561
  • Last login:March 17, 2025, 11:51:15 am
Re: Howards Pinball Wrapper and Mala question
« Reply #2 on: December 12, 2007, 10:39:40 pm »
If you can not get the wrapper to work outside of Mala then I would not expect it to work when you try to use the wrapper inside of Mala.

I am assuming Howard's wrapper exists to allow exiting Visual Pinball by pressing ESC .... is this correct?

1) You can try the Visual Pinball wrapper located at John's site (link below).  I believe John uses MameWah as a frontend but maybe you can tweak it to use with Mala:

http://www.emuchrist.org/cpviewer/visualpinball.htm

2) You might want to ask "headkaze" whether he has a Visual Pinball wrapper which you could use.  He has written a few wrappers in the past which work every time but I never asked him whether he had a Visual Pinball one ........

« Last Edit: December 12, 2007, 10:46:43 pm by unclet »

Necro

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1031
  • Last login:November 29, 2022, 08:22:22 pm
  • Building a 'Classic' MAME Cab
Re: Howards Pinball Wrapper and Mala question
« Reply #3 on: December 12, 2007, 10:52:02 pm »
I'm using mamewah, so I'll try that first.  I was having the persistant FBI warning screen.  That and the Closemul download seems to be broken (corrupt zip) so I couldn't try that.  I'll try your suggestion next, thanks.

shardian

  • Saint is the evil mastermind
  • Trade Count: (+23)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 9218
  • Last login:August 21, 2015, 03:11:31 pm
  • Friends don't let friends build frankenpanels...
Re: Howards Pinball Wrapper and Mala question
« Reply #4 on: December 13, 2007, 01:23:53 pm »
Same thing happened to me with Howard's wrapper. Couldn't find anything on the problem online, so I just abandoned it.

RXII

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 86
  • Last login:March 27, 2014, 07:45:51 pm
    • Aussie Lowboy Buildup
Re: Howards Pinball Wrapper and Mala question
« Reply #5 on: December 13, 2007, 06:23:17 pm »
Hi Guys,
             I have had alot of trouble also with Howards Wrapper, he did try to help me with it a fair while ago but I didn't get anywhere. I assumed it was because I was using TinyXP and it may have been missing something that the wrapper needed. I gave up but am keen to get it sorted out....all the family want to play is VP and its a pain in the ass getting the mouse out all the time to get it to 'focus' onto VP.

Simon.
Operation Aussie Lowboy http://forum.arcadecontrols.com/index.php?topic=68962.0
Soon I may actually be able to play it!

SGT

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1146
  • Last login:May 31, 2025, 10:10:32 pm
Re: Howards Pinball Wrapper and Mala question
« Reply #6 on: December 13, 2007, 07:12:28 pm »
I use closemul.exe from Mala to start visual pinball, and I don't have any focus problems.  I get the visual pinball splash screen and the visual pinmame splash screen.  Did HK's wrapper suppress those somehow?

Necro

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1031
  • Last login:November 29, 2022, 08:22:22 pm
  • Building a 'Classic' MAME Cab
Re: Howards Pinball Wrapper and Mala question
« Reply #7 on: December 13, 2007, 08:06:02 pm »
Yeah, it masks that.  It seems the other wrapper doesn't work either - similar problem as Howards. 

Could someone send me closemul to try?  Seems the download off the site is a broken zip.

SGT

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1146
  • Last login:May 31, 2025, 10:10:32 pm
Re: Howards Pinball Wrapper and Mala question
« Reply #8 on: December 13, 2007, 08:34:41 pm »
Don't know what it is about that zip, but it seems people that use Winrar (like me) can open it just fine.  Anyway, Gonzo linked another copy in this post:

http://forum.arcadecontrols.com/index.php?topic=74390.msg770632#msg770632

Necro

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1031
  • Last login:November 29, 2022, 08:22:22 pm
  • Building a 'Classic' MAME Cab
Re: Howards Pinball Wrapper and Mala question
« Reply #9 on: December 13, 2007, 09:09:25 pm »
Just tried that...and went nuts on the command line.  It SEEMS that the current version of vpinball has an issue with running from the command line.  I tried basically every combo possible, even moving the executables into the tables folder and renaming a vpt to something with no spaces.

No go... (and I used -play also).

SGT

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1146
  • Last login:May 31, 2025, 10:10:32 pm
Re: Howards Pinball Wrapper and Mala question
« Reply #10 on: December 13, 2007, 09:32:00 pm »
You need to specify the path and enclose it in quotes.  For example:

vpinball.exe -play -"tables\star wars.vpt"

or

vpinball.exe -play -"e:\emulators\visual pinball\tables\star wars.vpt"


I notice the double quotes are required even if the path and table name has no spaces.


« Last Edit: December 13, 2007, 09:36:25 pm by SGT »

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:Yesterday at 02:45:49 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Howards Pinball Wrapper and Mala question
« Reply #11 on: December 13, 2007, 10:21:08 pm »
Btw this applies to ALL wrappers as well.  You can't pass a command line with spaces in it and almost all vp paths have spaces.  :)

SGT

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1146
  • Last login:May 31, 2025, 10:10:32 pm
Re: Howards Pinball Wrapper and Mala question
« Reply #12 on: December 13, 2007, 11:29:37 pm »
Btw this applies to ALL wrappers as well.  You can't pass a command line with spaces in it and almost all vp paths have spaces.  :)

Yeah, but what I'm saying is that even when the path and the table name doesn't have spaces, vpinball.exe errors out if you do not include the quotes around the table path/name.  At least with my version of vpinball.exe.  I'm not even referring to a wrapper, but just starting vpinball from the command line.

Changing the subject:  Howard, how do you programatically hide the splash screens?  I have tried code that waits for the window and then immediately hides it, but of course you still get that real brief flash of that window.  I have also tried setting the frontend window to be modal for x number of seconds, but the splash screens come out on top.
« Last Edit: December 13, 2007, 11:31:36 pm by SGT »

Necro

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1031
  • Last login:November 29, 2022, 08:22:22 pm
  • Building a 'Classic' MAME Cab
Re: Howards Pinball Wrapper and Mala question
« Reply #13 on: December 13, 2007, 11:47:07 pm »
Yup, quotes do nothing to stop the erroring out.

Although, I did NOT have a - at the front of my table...


headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:August 14, 2023, 02:00:48 am
  • 0x2b|~0x2b?
Re: Howards Pinball Wrapper and Mala question
« Reply #14 on: December 14, 2007, 03:17:15 am »
Changing the subject:  Howard, how do you programatically hide the splash screens?  I have tried code that waits for the window and then immediately hides it, but of course you still get that real brief flash of that window.  I have also tried setting the frontend window to be modal for x number of seconds, but the splash screens come out on top.

Has anyone given Resource Hacker a try? I reakon you could get rid of all those screens using that. Try it out (I don't have time to test it right now though)

1. Download VPinMAME
2. Download upx and Resource Hacker
3. run upx.exe -d VPinMAME.dll to decompress the dll
4. Open VPinMAME.dll in Resource Hacker

Go to the dialog that asks if your the legal owner of the ROM and delete it or set it's width and height to zero, or make it a minimized or hidden window. There should be some way to not have this dialog show.

SGT

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1146
  • Last login:May 31, 2025, 10:10:32 pm
Re: Howards Pinball Wrapper and Mala question
« Reply #15 on: December 14, 2007, 11:07:46 am »
My vpinmame did not have that dialog coming up.  It just  had a bitmap that flashed up.  After replacing the bitmap with one that was 1 pixel wide, problem resolved.

On vpinball.exe, it was a dialog that I modified to the following to make it disappear:

Code: [Select]
228 DIALOGEX 0, 0, 0, 0
STYLE WS_POPUP | WS_VISIBLE
CAPTION ""
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
FONT 0, ""
{
}


No more splash screens and closemul gives me ESC as the exit key.  Thanks for the resource hacker idea Headkaze.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:Yesterday at 02:45:49 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Howards Pinball Wrapper and Mala question
« Reply #16 on: December 14, 2007, 01:42:13 pm »
Btw this applies to ALL wrappers as well.  You can't pass a command line with spaces in it and almost all vp paths have spaces.  :)

Yeah, but what I'm saying is that even when the path and the table name doesn't have spaces, vpinball.exe errors out if you do not include the quotes around the table path/name.  At least with my version of vpinball.exe.  I'm not even referring to a wrapper, but just starting vpinball from the command line.

Changing the subject:  Howard, how do you programatically hide the splash screens?  I have tried code that waits for the window and then immediately hides it, but of course you still get that real brief flash of that window.  I have also tried setting the frontend window to be modal for x number of seconds, but the splash screens come out on top.

Well, if the vpinball.exe's code is anything like my code, it uses the quotes to tell where the path is.  There are multiple command line flags and a program has to parse command lines manually ya know.  :)

To answer your question... honestly you don't.  You can get it 99% of the time but since you are hiding something you have to detect first, sometimes it'll slip through.  As you've discovered from hk you can hack the exe but that's about it.  The problem with that one though is that you have you do the hack again every time to upgrade.  It's a great idea, but not a completely practical one.


Necro

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1031
  • Last login:November 29, 2022, 08:22:22 pm
  • Building a 'Classic' MAME Cab
Re: Howards Pinball Wrapper and Mala question
« Reply #17 on: December 14, 2007, 03:09:33 pm »
Is everyone using the newest version of vpinball?  And NOT having the issue that I am?

SGT

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1146
  • Last login:May 31, 2025, 10:10:32 pm
Re: Howards Pinball Wrapper and Mala question
« Reply #18 on: December 14, 2007, 03:26:25 pm »
I wasn't using the newest version.  Just to test, I dl'ed the latest version and installed it.  I copied the contents of my tables folder over to the new installation.  Here is a c/p of the exact command line that I used to test:

Code: [Select]
vpinball -play -"tables\baywatch.vpt"
Below is the screenshot. Do you have all those script files that are necessary in your tables folder?


shock_

  • Wiki Contributor
  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 354
  • Last login:January 30, 2020, 06:23:29 pm
  • In Brisbane, it's GMT+10 all the time.
Re: Howards Pinball Wrapper and Mala question
« Reply #19 on: December 14, 2007, 10:20:28 pm »
edit (oops, responded to completely the wrong issue)

Necro

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1031
  • Last login:November 29, 2022, 08:22:22 pm
  • Building a 'Classic' MAME Cab
Re: Howards Pinball Wrapper and Mala question
« Reply #20 on: December 19, 2007, 06:56:03 pm »
I wasn't using the newest version.  Just to test, I dl'ed the latest version and installed it.  I copied the contents of my tables folder over to the new installation.  Here is a c/p of the exact command line that I used to test:

Code: [Select]
vpinball -play -"tables\baywatch.vpt"
Below is the screenshot. Do you have all those script files that are necessary in your tables folder?



Yes...I can run the tables fine through the included front end (the vplauncher thing).  Command line, however, isn't working.  Let me try adding that - in front of the table name.

Necro

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1031
  • Last login:November 29, 2022, 08:22:22 pm
  • Building a 'Classic' MAME Cab
Re: Howards Pinball Wrapper and Mala question
« Reply #21 on: December 19, 2007, 07:07:51 pm »
ok...well..got it working.  Sort of.  It will load a game, using closemul.exe.  However, I can't get the damn thing to exit now using escape! ;)

SGT

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1146
  • Last login:May 31, 2025, 10:10:32 pm
Re: Howards Pinball Wrapper and Mala question
« Reply #22 on: December 19, 2007, 08:15:40 pm »
Let me try adding that - in front of the table name.

I thought we resolved that back on December 13.   :banghead:  ;)

Quote
ok...well..got it working.  Sort of.  It will load a game, using closemul.exe.  However, I can't get the damn thing to exit now using escape!


Closemul.exe and closemul.ini should both be in the same folder as your vpinball.exe.  Can you post the contents of your closemul.ini file?

Necro

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1031
  • Last login:November 29, 2022, 08:22:22 pm
  • Building a 'Classic' MAME Cab
Re: Howards Pinball Wrapper and Mala question
« Reply #23 on: December 20, 2007, 08:30:03 pm »
Let me try adding that - in front of the table name.

I thought we resolved that back on December 13.   :banghead:  ;)

Quote
ok...well..got it working.  Sort of.  It will load a game, using closemul.exe.  However, I can't get the damn thing to exit now using escape!


Closemul.exe and closemul.ini should both be in the same folder as your vpinball.exe.  Can you post the contents of your closemul.ini file?

Hey now! :)  I had to away for a few days... :) 

Anyway, the closemul.ini is this:
[Parameters]
Exit Key 1=27
Exit Key 2=
Extract=
Extracted Ext 1=
Extracted Ext 2=
Pre Command=
Post Command=
Mount Program=
Mount Device=
Mount Parameters=
Registry File=
Automation=
Automation Steps=
Automation Delay=
Program=
Program 2=
Param Before File=
Param After File=
File=
Snap 1 Search=
Snap 2 Search=
Snap Extension=
Snap Source Folder=
Snap 1 Dest Folder=
Snap 2 Dest Folder=
Quit Management=1
Quit TimeOut=0
Disable Quotes=


And it's in the same dir as vpinball.exe.  Vpinball is starting up fine when run from closeemul, it's just that closemul doesn't seem to be detecting keypresses.  I also tried it with a blank (every setting default ini) and with setting the key to a few other keys - either it does nothing or (with esc) the exit/return dialog pops up.

SGT

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1146
  • Last login:May 31, 2025, 10:10:32 pm
Re: Howards Pinball Wrapper and Mala question
« Reply #24 on: December 20, 2007, 09:23:20 pm »
Even though I leave all options blank in closemul.ini, I tried your settings above and the ESC key closes vpinball.exe for me every time.   The only wild shot in the dark that I can throw out there is:

I have seen this behavior when there are multiple vpinball.exe occurences running in memory.  They don't show up on the task bar, at the bottom of the screen.  However Ctrl-Alt-Del to bring up the task manager.  Do you see multiple occurences of vpinball.exe  under the processes tab (not the applications tab)?   Of course if you have tried the closemul.ini file above immediately after a reboot, the point is moot.

Necro

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1031
  • Last login:November 29, 2022, 08:22:22 pm
  • Building a 'Classic' MAME Cab
Re: Howards Pinball Wrapper and Mala question
« Reply #25 on: December 21, 2007, 08:49:08 pm »
Hrm...let me check that.  Maybe it's not quitting correctly.   :/  Figures.  One thing I AM running is autohotkey.  I don't know if that's catching the keypresses and overriding closeemul.  Which would be an issue...  :/

Necro

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1031
  • Last login:November 29, 2022, 08:22:22 pm
  • Building a 'Classic' MAME Cab
Re: Howards Pinball Wrapper and Mala question
« Reply #26 on: January 11, 2008, 11:19:48 pm »
Sorry for the long delay in a reply...I was away for the holidays and then got a promotion at work (well, kind of...got put in charge of a large project).

Anyway, did some more digging and something weird is happening. 

Basically, hitting escape exits closemul (AND MameWah) but doesn't exit vpinball.  That makes zero sense to me...(and there isn't an extra process  of vpinball running)

Tiger-Heli

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5447
  • Last login:January 03, 2018, 02:19:23 pm
  • Ron Howard? . . . er, I mean . . . Run, Coward!!!
    • Tiger-Heli
Re: Howards Pinball Wrapper and Mala question
« Reply #27 on: June 17, 2009, 01:41:34 pm »
My vpinmame did not have that dialog coming up.  It just  had a bitmap that flashed up.  After replacing the bitmap with one that was 1 pixel wide, problem resolved.

On vpinball.exe, it was a dialog that I modified to the following to make it disappear:

Code: [Select]
228 DIALOGEX 0, 0, 0, 0
STYLE WS_POPUP | WS_VISIBLE
CAPTION ""
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
FONT 0, ""
{
}


No more splash screens and closemul gives me ESC as the exit key.  Thanks for the resource hacker idea Headkaze.

Old thread, but this was news to me -

Resource Hacker seemed to work fine with Vpinmame.dll - at least it let me replace the bitmaps and when I open the saved file in ResHack, they are gone.  I haven't tested it, but it looks promising, and those were the one's that annoyed me.

However, with vpinball 8.1, I could open the file and see the dialog SGT mentioned, but if I changed anything and saved the file, the new file did not have an icon, ResHack reported an error when I closed it, the new file would not open, and ResHack also could not open the new file.

Any suggestions/ideas?

I can live with the VP screens if there is no good fix!!!
It's not what you take when you leave this world behind you, it's what you leave behind you when you go. - R. Travis.
When all is said and done, generally much more is SAID than DONE.

Tiger-Heli

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5447
  • Last login:January 03, 2018, 02:19:23 pm
  • Ron Howard? . . . er, I mean . . . Run, Coward!!!
    • Tiger-Heli
Re: Howards Pinball Wrapper and Mala question
« Reply #28 on: June 18, 2009, 06:56:50 am »
Okay - this board is great (and I’m a moron, but we’ll let that slide).

Anyway - I figured out what was going on.  I was changing the Window size to 0, 0, 0, 0 or Hidden, but not changing the rest of the code SGT posted.

I changed the rest and it works fine now.

However, I’ll contribute something to the forum now.

I despised the VPinMAME splash screens and am glad they are gone, however, the tables took a fair amount of time to load, and I found just having the VP icons show up in the taskbar didn’t re-assure me that something was happening.

But I didn’t think the Splash screen needed to be half the screen size either.  So I reduced it to 3/4-size as follows:

Copied the Bitmap at Position 264 and pasted it into Irfanview and scaled it from 188x44 pixels to 141x33 pixels and replaced it using Res Hacker.

Changed the code for Dialog 228 as follows:

Code: [Select]
228 DIALOGEX 0, 0, 169, 67
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Preparing Table"
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
FONT 8, "MS Sans Serif"
{
   CONTROL "Progress2", 216, "msctls_progress32", WS_CHILD | WS_VISIBLE | WS_BORDER, 6, 52, 156, 10
   CONTROL "", 218, STATIC, SS_LEFT | WS_CHILD | WS_VISIBLE | WS_GROUP, 9, 39, 147, 11
   CONTROL 264, -1, STATIC, SS_BITMAP | WS_CHILD | WS_VISIBLE, 34, 3, 94, 20
   CONTROL "A Randy Davis Production", -1, STATIC, SS_CENTER | WS_CHILD | WS_VISIBLE | WS_GROUP, 35, 27, 98, 12
}

Personally, I like how it turned out.

Thanks again for the help!!!
It's not what you take when you leave this world behind you, it's what you leave behind you when you go. - R. Travis.
When all is said and done, generally much more is SAID than DONE.

Tiger-Heli

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5447
  • Last login:January 03, 2018, 02:19:23 pm
  • Ron Howard? . . . er, I mean . . . Run, Coward!!!
    • Tiger-Heli
Re: Howards Pinball Wrapper and Mala question
« Reply #29 on: June 20, 2009, 10:19:14 am »
Found something else useful ....

I hate the "Return to game/Quit to Windows" Dialog.

Closemul works to eliminate this, but lately I have been using VP-Man and it does not easily support custom command lines.

I think I found a workaround, though.

At least in VP 8.1, Alt-F4 quits the table directly without the message and exits to the command line.  And for most FE's (or other programs), Alt-F4 works as Escape also.

So all you have to do is re-map the escape key to send Alt-F4.

This can be done with AutoHotKey and a simple pinball.ahk script containing:

$Escape::!F4
return

If you don't want the change to be permanent, you can probably use BatchRun to load the AHK script, load the VP frontend, and then unload the AHK script on exit (maybe with Taskkill).

I haven't worked out all the details, but the AutoHotKey script works from the command prompt, so it should work from the front-end as well.

Hope This Helps!!!
It's not what you take when you leave this world behind you, it's what you leave behind you when you go. - R. Travis.
When all is said and done, generally much more is SAID than DONE.

Tiger-Heli

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5447
  • Last login:January 03, 2018, 02:19:23 pm
  • Ron Howard? . . . er, I mean . . . Run, Coward!!!
    • Tiger-Heli
Re: Howards Pinball Wrapper and Mala question
« Reply #30 on: June 22, 2009, 06:48:53 am »
Yipes - I got this working, but I see why people have a love/hate (mostly hate) relationship with computers.

On my work computer, the AHK script worked fine, and this should have been a simple process all from within AHK consisting of the following lines:

Code: [Select]
$Esc::!F4
return
runwait, G:\Pinlaunch_VP-Man\VPMAN.exe
ExitApp
Looks simple enough ….

When I tried this on my home computer, NOTHING was happening, and AHK wouldn’t even process the first line …

I split the script into two files - the part that re-mappped Esc to Alt-F4, and the part that launched VP-Man and then waited for it to end, and exited.

Through trial and error with the helpfile, for the remapping script, I experimented with:

Code: [Select]
#InstallKeybdHook
#Usehook,
Esc::send, !F4
Return

That didn’t seem to be working correctly, so I loaded up KeyScan and found that when I pressed Esc, AHK was sending ALT-SHIFT-F-4 instead of ALT-F4, even though the help file said F1-F24 sends the function keys.  Nice!!!

I found the section on Mystery Keys in the help file and (for my keyboard at least), changed the file to:

Code: [Select]
#InstallKeybdHook
#Usehook,
Esc::send, !{VK73SC03E}
Return

KeyScan closed as soon as I pressed Escape, so I tested with Visual Pinball and it exited without the Paused dialog.

I exited AHK and loaded the VP-Man script and VP-Man loaded, and AHK exited when I quit VP-Man.

So I just had to join the two scripts together (I thought), but then VP-Man did NOT load.

I ended up using Batchrun, calling the first AHK script, then loading VP-Man with the Wait command, then using Batchrun’s EndProcess command to kill AHK.

I ran into one minor glitch with VP-Man in that if you click an image file to display it in full-screen, you are supposed to press Esc to return to the front-end.  I no longer had a way to press Esc, and Alt-F4 wouldn’t work.  (I realized later there was a right mouseclick menu that would get you out of this, but before I realized that I modified the script so now Alt-F4 sent a normal Esc).  Again, AHK wanted to send Shift-E-S-C when I used Esc, so the script had to use scan codes like:

Code: [Select]
#InstallKeybdHook
#Usehook,
Esc::send, !{VK73SC03E}
!SC03E::send, {VK1BSC001}
return

The only really minor problems now are:
o   For some reason, the version of VP that uses SGT’s code is hit-or-miss.  Half the time it works fine and half the time it loads the table but never gives focus to the table window, so I ended up using my small loading screen version instead.
o   Known WinXP glitch that even though AHK is closed when VP-Man exits, the AHK icon remains in the Systray until you mouse over it…  (Not a perfect solution, but I got around this by adding #NoTrayIcon to the start of the script.)  This works fine, but has several flaws:
o   Other than Ctrl-Alt-Del, Processes, there is no way to know if the script is running or shut the script off if it fails.
o   You have to trust the script to work properly and exit properly.
o   In this case, the script is fairly harmless - it sends Esc when Alt-F4 is pressed and Alt-F4 when Esc is pressed - for most programs, they do pretty much the same thing, so leaving it running wouldn’t cause major problems.
o   If AHK had a command-line parameter to Exit the app entirely, that would be a better option, but I didn’t see one - I tried creating a new script to close the existing one and launch ExitApp to close AHK, but it didn’t work.  (There is probably a way to modify the existing script to check for the presence of the VP-Man window and ExitApp when it is closed - which would be more elegant, but beyond my skill level and this works).

Again, I’m pretty pleased with it, and the same concepts should work with any Front-end and program, provided:
o   Frontend can be closed by Alt-F4 (most can).
o   Frontend does not really need Escape for any internal items.
o   All programs launched by the frontend can exit using Alt-F4 (most will, not sure of emulators).
o   All programs launched by the frontend can accept a keyhook (I don’t think MAME does - you might be able to modify the AHK script to not require this, though.
It's not what you take when you leave this world behind you, it's what you leave behind you when you go. - R. Travis.
When all is said and done, generally much more is SAID than DONE.

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:August 14, 2023, 02:00:48 am
  • 0x2b|~0x2b?
Re: Howards Pinball Wrapper and Mala question
« Reply #31 on: June 23, 2009, 09:41:20 pm »
The usual reason an application's icon remains in the systray is because it hasn't been shutdown correctly. If an application shuts down gracefully it will remove itself from the systray upon exit.

I recommend you take a look at process.exe which allows you to close an app using a WM_CLOSE message instead of killing it. This should allow it to remove itself from the tray correctly.

I found a thread about doing this via AHK you can read about it here

Tiger-Heli

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5447
  • Last login:January 03, 2018, 02:19:23 pm
  • Ron Howard? . . . er, I mean . . . Run, Coward!!!
    • Tiger-Heli
Re: Howards Pinball Wrapper and Mala question
« Reply #32 on: June 24, 2009, 07:17:37 am »
Thanks Headhaze.

I'll give Process.exe a try, but from the comments in the AHK thread, I have my doubts.

The other three AHK scripts at the end of the AHK thread look promising, though.

For me, it's not a big deal since having the script running without knowing about it isn't a big deal (Esc is not Alt-F4, Alt-F4 is now Esc, but most programs won't care), but I like to know what the PC is doing.

Ironic to me that I need to run an AHK script to clear the tray icon from a previously exited AHK script that didn't clear the systray.

The bigger issue I have is why the hidden version of VP sometimes doesn't give focus to the table when launched from VP-Man, but does otherwise, but only other VP-Man users can answer that, I suspect.

Thanks again!!!
It's not what you take when you leave this world behind you, it's what you leave behind you when you go. - R. Travis.
When all is said and done, generally much more is SAID than DONE.

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:August 14, 2023, 02:00:48 am
  • 0x2b|~0x2b?
Re: Howards Pinball Wrapper and Mala question
« Reply #33 on: June 24, 2009, 11:03:13 pm »
The bigger issue I have is why the hidden version of VP sometimes doesn't give focus to the table when launched from VP-Man, but does otherwise, but only other VP-Man users can answer that, I suspect.

I haven't had a close look myself but it could be to do with it being a modal window or issues caused by it not gaining focus from it's size being changed. The usual way to get around it is to keep the window the same except have it invisible by not setting WS_VISIBLE. The problem is in most cases the resource settings won't change the fact the window is being shown using ShowWindow with SW_SHOW so it will show anyway despite the settings in the resource file. There are other ways to hide the window that might be worth trying like.

Code: [Select]
228 DIALOGEX 0, 0, 169, 67
STYLE WS_POPUP
CAPTION ""
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
FONT 0, ""
{
}

But my guess is it will get shown anyway. So perhaps you could have it positioned top left like -169, -67, 169, 67. Something else that might be worth a try is deleting the the whole thing in resource hacker (from the tree list). In some cases that will work. Anyway a few things to try and let us know if you have an progress.

Tiger-Heli

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5447
  • Last login:January 03, 2018, 02:19:23 pm
  • Ron Howard? . . . er, I mean . . . Run, Coward!!!
    • Tiger-Heli
Re: Howards Pinball Wrapper and Mala question
« Reply #34 on: June 25, 2009, 07:15:47 am »
Process.exe -q AutoHotKey.exe worked like a champ - none of the AHK scripts from the forum would even load though.
Thanks HeadKaze - it’s nice to know what the computer is doing!!!

Either I didn't understand your post above, or you didn't understand the problem (more likely the former).

I have two hacked versions of Vpinball.exe.

The one where I made the splashscreen smaller works flawlessly (but I still have a small splashscreen).

The one where I used SGT's code above with WS visible usually works flawlessly with NO splashscreen, at least if I double-click on a table.  From the VP-Man frontend, about 50% of the time it works flawlessly and 50% of the time it launches the table but does not give it focus, so you have to click on the icon in the taskbar to run the table (VP-Man is not full-screen, so that's not a huge deal, but not knowing whether it is going to work or not is).  I have never seen it fail from the command line, but I've only done that a couple of times, so it might only be 50% but the two times I tried were both the 50% that it worked.

Anyway - I'll try the code above and report back ...
It's not what you take when you leave this world behind you, it's what you leave behind you when you go. - R. Travis.
When all is said and done, generally much more is SAID than DONE.

Tiger-Heli

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5447
  • Last login:January 03, 2018, 02:19:23 pm
  • Ron Howard? . . . er, I mean . . . Run, Coward!!!
    • Tiger-Heli
Re: Howards Pinball Wrapper and Mala question
« Reply #35 on: June 25, 2009, 07:17:39 am »
BTW - it's not a huge deal - I originally liked the smaller splash-screen version, b/c it confirmed the computer was loading something.  From a front-end, I'd like to at least TRY the silent version, though.

Thanks again!!!
It's not what you take when you leave this world behind you, it's what you leave behind you when you go. - R. Travis.
When all is said and done, generally much more is SAID than DONE.

Tiger-Heli

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5447
  • Last login:January 03, 2018, 02:19:23 pm
  • Ron Howard? . . . er, I mean . . . Run, Coward!!!
    • Tiger-Heli
Re: Howards Pinball Wrapper and Mala question
« Reply #36 on: June 27, 2009, 09:19:51 am »
It works!!! (Well, kinda - HeadKaze’s code failed, but it helped me figure out what would work!!!)

To re-cap:

o   SGT’s code called a visible window of 0x0 pixels.  It hid the window, but sometimes the table never got focus.
o   My code used a window about one-half the size of the original window.  It never failed to load the table.
o   Headkaze’s code was essentially the same as SGT’s code, but with a 169x67 pixel window, and the WS_VISIBLE command removed.  I only tried it once, but it created a blank 169x67 pixel window and the table did get focus.
o   That got me thinking that for the table to get focus, for some reason, the script needed to think the window was being display.  The solution I came up with, that’s worked flawlessly on my machine, is to crate a 1x1 pixel window with no code in it.  So the new code is:

Code: [Select]
228 DIALOGEX 0, 0, 1, 1
STYLE WS_POPUP
CAPTION ""
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
FONT 0, ""
{
}

Also works great for Black and Stein's F1 Pinball game after you UPX -d it.  :applaud:

Thanks to everyone that helped with this!!!
It's not what you take when you leave this world behind you, it's what you leave behind you when you go. - R. Travis.
When all is said and done, generally much more is SAID than DONE.

Tiger-Heli

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5447
  • Last login:January 03, 2018, 02:19:23 pm
  • Ron Howard? . . . er, I mean . . . Run, Coward!!!
    • Tiger-Heli
Re: Howards Pinball Wrapper and Mala question
« Reply #37 on: July 04, 2009, 07:59:17 am »
Okay for anyone who is following along, this does not completely work for VP9 (rocks for VP8), but I have thought I had a solution that I am happy with.

VP9 has the same “Rendering Table” dialog and you can hide that by the method above, however, it also opens the editor before launching the table and briefly shows the editor on exit.

There might be command-line options to start it minimized, or you might be able to write a batch file to launch it minimized, but since I am not sure what command structure VP-Man actually sends, I didn’t set one.

I played with the file and found out if I maximized it and closed it, it re-opened maximized.  If I restored it and changed window size and position, it remembered that, and if I minimized it and closed and re-opened it, it opened at the last restored size.

So what I did is restore the window, and then shrink it to minimum height and about 100 pixels wide, and drag it to right below the top of the taskbar.  So when I start VP9 from VP-Man, I now see “Loading Table” and a progress bar in the VP-Man Status bar, and then the table loads, and on exit I see the VP9 editor at default (normal default) size for 1-2 seconds then it goes away.  I’m not going to worry about it any more, though, because it gives me a visual confirmation that the table is loading in VP9 and not VP8, which I would lack otherwise.

Drawback is you basically need to maximize it to do anything with the editor, but I can live with that too.

DRATS - spoke too soon - it does that the FIRST time you load a table - after you quit the table, it restores the editor to it’s initial internal default and uses that - so nothing gained.

I need to figure out how to set the initial window size and have it stick (and without using something like AHK that I need to run from a batch file - although if I could add it to my Alt-F4-Esc script, I guess that could work).
It's not what you take when you leave this world behind you, it's what you leave behind you when you go. - R. Travis.
When all is said and done, generally much more is SAID than DONE.

Tiger-Heli

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5447
  • Last login:January 03, 2018, 02:19:23 pm
  • Ron Howard? . . . er, I mean . . . Run, Coward!!!
    • Tiger-Heli
Re: Howards Pinball Wrapper and Mala question
« Reply #38 on: July 01, 2010, 07:16:12 am »
Old post, but I found something else that almost works.  Also posted here.

Via trail-and-error, I found out that VP does support a minimized parameter, so from a command prompt, sending "Vpinball907.exe -minimized /play -tablename.vpt" did EXACTLY what I was looking for. The bad news:

• I do not know of a way to set a custom launch line in VP-Man.
• I could probably do it pretty easily in another front end - such as Mala, EmuLoader, Mamewah, HyperPin (maybe), etc. - but I would lose most of the cool features of VP-Man such as Table Recognition, auto screenshot capture, table classification, auto-close editor on exit, etc.
• I didn't see any type of menu item for VP to minimize the editor when loading a table.

My next thought was to look at the registry (but I had no idea which options would work, so it was a matter of blind trial-and-error …

I looked at HKCU\Software\Visual Pinball\Editor.

There was a key for WindowMaximized (set to 0), so my first thought was to add a "WindowMinimized" key and set it to "1" - didn't work.

I did see WindowBottom, WindowLeft, WindowRight, and WindowTop settings.

(BTW, I use a screen resolution of 1024x768).

My first attempt was setting bottom - 1, Left - 0, Right - 1, Top - 0. This almost worked - there was a title bar that was 123x34 pixels in the upper left.

I then tried to set Window Left to 1500, which would have been off the screen, but it automatically dropped it back to 901 and put it flush right.

Then I tried to hit the bottom right of the screen. I found out that setting window top to more than 734 (768-34) made it default to 0 and full-height. However, setting it at 734 (On WinXP) made it draw the window title BEHIND the taskbar and almost invisible.

However, I still needed to be able to manually open the editor when I wanted to view/change table settings, so I clicked on the title and drug it upward until I could JUST click the Maximize and close buttons with the mouse.

My final settings ended up:
WindowBottom - 781 (not sure this is used in this case)
Window Left - 901
Window Right - 1024
Window Top - 729 (just above the single row taskbar)

The only real drawback is to have it continue working, I have to maximize the editor window when I am editing a table and minimize it back when I am not - but I'm okay with that.

Hope this helps someone else out!!!

BTW - If you don't want to hack the registry, you could get similar results by manually reducing the main editor window to minimum dimensions and moving it wherever you want - but I'm not sure if you can put it behind the taskbar doing it that way.
It's not what you take when you leave this world behind you, it's what you leave behind you when you go. - R. Travis.
When all is said and done, generally much more is SAID than DONE.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:Yesterday at 02:45:49 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Howards Pinball Wrapper and Mala question
« Reply #39 on: July 11, 2010, 02:24:58 am »
I can't believe VP still has the same basic problems after all of these years.  It's one of the reasons I don't mess with VP anymore (and subsequently why I don't up-keep the wrappers either)  I assumed that opening the project up to open-source a few months ago would have had this issues instantly solved, but alas this isn't the case.

That being said I'm working on a "sort of secret" project right now that just by chance will require vp to work for me.  It's low priority right now, but eventually I want to find a solution as well and I'll post it here when I do.