Arcade Project (winmaximize trouble)

Ask gaming related questions
0zzy
Posts: 6
Joined: 02 Jul 2020, 02:57

Arcade Project (winmaximize trouble)

02 Jul 2020, 07:01

Hi, all.
I'm configuring an arcade machine with windows 10 and EmulationStatiion as frontend.

When i press ESC, from mame or other emulators, game quit and i return to emulationstation on full screen, but with some particular games (arcade dump) when i hit ESC i can quit the game, but EmulationStation stay minimized on taskbar.

I use a .bat file to run game from ES, at the end of this .bat, i have tried to call a simple AHK script like this:

Code: Select all

WinWait, EmulationStation
WinMaximize ;
but this run another instance of ES.

Someone can help me?
Last edited by 0zzy on 07 Jul 2020, 15:25, edited 2 times in total.
0zzy
Posts: 6
Joined: 02 Jul 2020, 02:57

Re: Arade Project (winmaximize trouble)

02 Jul 2020, 14:39

Xtra wrote:
02 Jul 2020, 11:33
Use: WinRestore and then WinMaximize
Hi now whit this script

Code: Select all

WinRestore, EmulationStation
WinWait, EmulationStation
WinMaximize 
ES is minimized, look at the attachment
Attachments
Immagine.png
Immagine.png (359.83 KiB) Viewed 1941 times
User avatar
Xtra
Posts: 1786
Joined: 02 Oct 2015, 12:15

Re: Arade Project (winmaximize trouble)

02 Jul 2020, 16:08

Try using in this order:

Code: Select all

WinWait, EmulationStation
WinRestore, EmulationStation
WinMaximize, EmulationStation
0zzy
Posts: 6
Joined: 02 Jul 2020, 02:57

Re: Arade Project (winmaximize trouble)

06 Jul 2020, 13:50

Hi @Xtra it does not work, i think it is due to a wrong execution order
If i have seen right, when i run the main game loader, it run a sub process named game.exe (32-bit), so when i run the bat it run the loader then maximize ES for a second and then run the game.
Is it possibile to maximixe ES only if game.exe process is closed?
User avatar
Xtra
Posts: 1786
Joined: 02 Oct 2015, 12:15

Re: Arade Project (winmaximize trouble)

06 Jul 2020, 15:26

Code: Select all

if !WinExist("ahk_exe game.exe")
{
    WinWait, EmulationStation
    WinRestore, EmulationStation
    WinMaximize, EmulationStation
}
or

Code: Select all

WinWaitClose, ahk_exe game.exe
WinWait, EmulationStation
WinRestore, EmulationStation
WinMaximize, EmulationStation
0zzy
Posts: 6
Joined: 02 Jul 2020, 02:57

Re: Arade Project (winmaximize trouble)

07 Jul 2020, 10:32

This is the script as you suggested:

Code: Select all

WinWaitClose, ahk_exe Game Loader All RH.exe
WinWait, EmulationStation
WinRestore, EmulationStation
WinMaximize, EmulationStation
Looking at the screenshot, this script wait the closure of the exe but it remain on WinWait, EmulationStation (there is no visible ES windows opened on the taskbar)
If i quit the ahk script, ES open on full screen.

With Autoit i have seen ES has Class Hidden (i don't know what it is and if it is a good info)
Immagine2.png
Immagine2.png (81.25 KiB) Viewed 1128 times
0zzy
Posts: 6
Joined: 02 Jul 2020, 02:57

Re: Arade Project (winmaximize trouble)

07 Jul 2020, 12:50

Xtra wrote:
07 Jul 2020, 10:48
Take a look at: DetectHiddenWindows
HI, i think have solved (i don't know if the best way), using for every function the second parameter WinText instead of WinTitle

Code: Select all

WinWaitClose, ahk_exe Game Loader All RH.exe
WinWait, , emulationstation
WinRestore, , emulationstation
WinMaximize, , emulationstation
I'm testing a little more..but it seems work.

Thank you Xtra for your great support!
0zzy
Posts: 6
Joined: 02 Jul 2020, 02:57

Re: Arcade Project (winmaximize trouble)

10 Jul 2020, 14:48

Hi Xtra, i was wrong, that code worked only becouse i had other window opened in which there was emulationstation name present on the title bar i suppose.

I have read a little more the manuale and this works fine:

Code: Select all

WinWaitClose, ahk_exe Game Loader All RH.exe
DetectHiddenWindows, On
WinWait, ahk_exe EmulationStation.exe
WinRestore, ahk_exe EmulationStation.exe
WinMaximize, ahk_exe EmulationStation.exe

Return to “Gaming”

Who is online

Users browsing this forum: No registered users and 22 guests