Jump to content

FPLaunch MOD: Pause and Loading screens...


samwyze

Recommended Posts

Great work guys, just keeps getting better.......

The 1st post update definitely sells it.

Blur has put alot into keeping it all going.

Good to see things finally getting back to normal for you samwyze.

Cheers, it's a bizarre time here - we're all quite used to the 30km speed limits because of the trashed roads, it's going to be at least a year before our sewers are fixed. Our 'city' center is still a no go zone, infact most of town has been flattened. Now the insurance companies are screwing people in the 'red' zone (areas where the land is too unstable to rebuild), they are saying if the house is repairable then they will only pay the cost of repairs instead of the total property value - even though you are not allowed to build in the red.

Total cost of earthquake so far - NZD$14 billion

Link to comment
Share on other sites

  • 2 weeks later...

Just downloaded and installed the new Lethal Weapon Alpha Edition table and installed it. If I launch it out of HyperPin it loses focus, I have to hit esc then hit esc again to gain control of the table. Using the latest WIP build of FPLaunch. This is the only table doing this.

Is it something in the table script that causes this? I have tried a couple of older builds of FPLaunch and the problem is still there. No issues launching and playing it through VP. Any idea what is going on? Thanks.

Link to comment
Share on other sites

Just downloaded and installed the new Lethal Weapon Alpha Edition table and installed it. If I launch it out of HyperPin it loses focus, I have to hit esc then hit esc again to gain control of the table. Using the latest WIP build of FPLaunch. This is the only table doing this.

Is it something in the table script that causes this? I have tried a couple of older builds of FPLaunch and the problem is still there. No issues launching and playing it through VP. Any idea what is going on? Thanks.

so lethal weapon and fplaunch wip 4 right?

will test it and let you know how it goes.

Link to comment
Share on other sites

ok, i tested a bit, old versions works fine

new alpha version is very slow with and without hyperpin and doesn't respond to 5 and 1, will test a little more, but for now looks like very troubled table

will test a bit more and see if i find something

Link to comment
Share on other sites

ok, i tested a bit, old versions works fine

new alpha version is very slow with and without hyperpin and doesn't respond to 5 and 1, will test a little more, but for now looks like very troubled table

will test a bit more and see if i find something

Works fine here.

Link to comment
Share on other sites

it wasn't like it didn't worked

it worked in 4 out of 5 launches

but every now and then it would loose timings and it would not focus ok

since some people already reported they have focus problems i decided to fix this to work 100% hoping that more bullet proof code would solve other focus problems people have

I tested many times and saw that all problems start because loading screen closes before game is on screen, which means ifwinactive becomes true eventhough window is not active

so after exit from loading loop I made 1 sec sleep, few winactivates, few clicks and now everything seems much more bullet proof

i can post changed lines if somebody wants to try

Link to comment
Share on other sites

it wasn't like it didn't worked

it worked in 4 out of 5 launches

but every now and then it would loose timings and it would not focus ok

since some people already reported they have focus problems i decided to fix this to work 100% hoping that more bullet proof code would solve other focus problems people have

I tested many times and saw that all problems start because loading screen closes before game is on screen, which means ifwinactive becomes true eventhough window is not active

so after exit from loading loop I made 1 sec sleep, few winactivates, few clicks and now everything seems much more bullet proof

i can post changed lines if somebody wants to try

I'd love to try. I have focus issues exiting tables almost all the time, and sometimes when launching tables (it'll stay on the loading screen now and then, and I have to ALT-Tab to sort it out).

Thanks, Blur.

Link to comment
Share on other sites

ok here is the new code for visual pinball section (the one that starts with if systemname=visual pinball):

	Hotkey, $!F4, ShowVP
If (useLoadScreen   = "true") ;Draw the loading Gui with wrapped Progress bar
	Gosub CreateLoadScreen
Else {
	WinWait, ahk_class VPinball
	WinHide, ahk_class VPinball
}
[color="Red"]	;wait one more sec
Sleep 1000
WinActivate, ahk_class VPPlayer
WinWaitActive, ahk_class VPPlayer ;Wait for vp to be Ready before killing Gui blackScreen
Gui, Destroy
WinWaitActive, ahk_class VPPlayer ;Wait for vp to be Ready before killing Gui blackScreen
;bring dmd on top of playfield
DetectHiddenWindows off 	;don't detect dmd if it is hidden
WinActivate, ahk_class MAME
WinWaitActive, ahk_class MAME,,0
Sleep 100
;click on dmd
Click 10, 10
WinWaitActive, ahk_class MAME,,0
Sleep 100
DetectHiddenWindows on
WinActivate, ahk_class VPPlayer
WinWaitActive, ahk_class VPPlayer
;MouseMove A_ScreenWidth//2, A_ScreenHeight//2
;click in the middle of playfield
Click 960, 540
WinActivate, ahk_class VPPlayer
WinWaitActive, ahk_class VPPlayer
[/color]	Process, WaitClose, %executable%
}

red part is new, so just put red commands over old ones.

black stays the same.

you should also put vpinball.exe in nt comp mode

Edited by blur
Link to comment
Share on other sites

@blur, I think we should write a new routine to use instead of winactivate, as the ahk lib command obviously has trouble playing with vpinball and vpinmame. From the ahk forums:

WinActivate makes several attempts to activate the window. If every attempt fails, the window is not going to be activated and WinWaitActive will only serve to stall the script until you manually activate it. WinActivate only returns after the window is active or it has made the maximum number of attempts.

Also, from msdn:

The system restricts which processes can set the foreground window. A process can set the foreground window only if one of the following conditions is true: 
The process is the foreground process. 
The process was started by the foreground process. 
The process received the last input event. 
There is no foreground process. 
The foreground process is being debugged. 
The foreground is not locked (see LockSetForegroundWindow). 
The foreground lock time-out has expired (see SPI_GETFOREGROUNDLOCKTIMEOUT in SystemParametersInfo). 
No menus are active. 

http://msdn.microsoft.com/en-us/library/ms633539.aspx

Although inserting a sleep is the best way with pure ahk, could someone (blur?) try something like:

IfWinExist, ahk_class VPPlayer
{ 
WinGet, hWnd, ID, ahk_class VPPlayer
DllCall("SetForegroundWindow", UInt, hWnd) 
Sleep 1000 
} 

or

IfWinExist, ahk_class MAME
{ 
WinGet, hWnd, ID, ahk_class MAME
DllCall("SetForegroundWindow", UInt, hWnd) 
Sleep 100
Click 10,10
} 

So, basically, using the winapi to bring it to front and focus, rather than however ahk is doing it.

Ideally, it would be great to use a method that doesn't need/rely on a sleep as finding the 'perfect' sleep time is a real pain with the various pcs and pc setups out there - what works for my aging lappy will be well off for the latest gen i7 with 1gig vid card etc...

Edited by samwyze
Link to comment
Share on other sites

Updated first post, showing service menu, and swf DMD displaying PINemHi hiscores.

Unsure whether to add this dmd to menu as showen in second dmd pic - comments?

I like it. Looks cool.

It's hard to tell from the image, since it's scaled - it looks like it's trying to do a DMD sort of dot-matrix display, but the lettering appears to be connected with solid lines, as opposed to being made of dots. I suspect dots might be some fun to do, and that's why it looks that way? Or is it just the scaling on the image that's made it look connected like that?

Either way - great work!

Link to comment
Share on other sites

So the exit menu replaces the Pause graphic???? when hit esc.

I dont know about the DMD with the menu......... maybe it will grow on me.

As paul said about the scaling........ also looks too big to me.

An option to have it or not....

Edited by DedroK_V
Link to comment
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
×
×
  • Create New...