This guide is quick & dirty and for
windows-systems only:
Different emulator-systems, games and applications on Windows do not start in fullscreen mode by itself.
They need an input from keyboard, pressing a hotkey or move and click mouse button to special position.
After finishing playing this Windows application, it's not possible to return back to AM by hitting ESC-button.
AutoIT offers an easy way to solve this problems. I'll show you how autoit works by playing
Super Road Blaster.
current:For playing Super Road Blaster, use
bsnes.exe v088 (because it supports the MSU-1-enhancement correct and perfect).
After starting the game, you need to push F11 for fullscreen. In the middle of screen you see the mouse cursor (so you have to move the mouse out of screen focus).
After finishing game, you can not exit Super Road Blaster or bsnes.exe by hitting ESC-button.
target (full automatic):Super Road Blaster starts > get into fullscreen > move mouse cursor away from center > exit game/bsnes by pushing ESC-Button
01)
get and install bsnes. Start bsnes.exe (e.g. C:\bsnes\bsnes.exe )
02)
open taskmanager (ctrl + alt + del => taskmanager) and identify the current process/task of bsnes (in this case : bsnes.exe )
03)
close bsnes.exe
04)
get and install
autoit
05)
goto folder of autoit and look for Au3Info.exe
06)
starts Au3Info.exe > Options > uncheck Freeze (so it's "unfreezed")
07)
click on tab : Visible Text
08)
goto folder of bsnes and starts bsnes.exe (e.g. : C:\bsnes\bsnes.exe )
09)
click to title of bsnes.exe, to get bsnes as the current front window
10)
Notice Au3Info.exe. View has been changed. You see:
RED : the current title of current front window : bsnes v088
GREEN : text, that gives the current front window : No cartridge loaded
11)
Now load Super Road Blaster by loading dialog into bsnes.exe
12)
Notice Au3Info.exe. View has been changed. You see:
RED : the current title of current front window : SuperRoadBlaster
GREEN : text, that gives the current front window : Loaded SuperRoadBlaster
13)
Wait a moment. Notice Au3Info.exe. View has been changed. You see:
RED : the current title of current front window : SuperRoadBlaster
GREEN : text, that gives the current front window : FPS: and_the_frames_per_second
14)
With this Infos, we are now able to generate a suitable script. So, right mouse on desktop > create > autoit v3 script > superroadblaster.au3
15)
use this code:
#include <Misc.au3>
;starts bsnes with parameter to load superroadblaster; like this : "C:\bsnes\bsnes.exe" "C:\bsnes\SuperRoadBlaster.sfc\SuperRoadBlaster.sfc"
run ('"' & @scriptdir & '\bsnes.exe"' & " " & @scriptdir & "\SuperRoadBlaster.sfc\SuperRoadBlaster.sfc")
;waits for bsnes, that superroadblaster is loaded
winwait("SuperRoadBlaster", "Loaded SuperRoadBlaster")
WinWaitActive("SuperRoadBlaster")
;holds on one second (1000 milliseconds = 1 second)
Sleep(1000)
;waits for bsnes, that are the frames per second (FPS) are shown
winwait("SuperRoadBlaster", "FPS:")
WinWaitActive("SuperRoadBlaster")
;sends the F11 Button as hotkey for fullscreen ten times ( ten times because, depending of gamesize bsnes got some input lags loading a bigger game )
send("{F11 10}")
;moves mouse cursor away from focus to xy-position ; x = left,right ; y = up,down ; x=2000 ; y=308
MouseMove(2000, 308, 0)
;script waits for push ESC-button and close task/process bsnes.exe ( see 02) ); (1B is the hexadecimal value of ESC-Button ; further buttons see : https://www.autoitscript.com/autoit3/docs/libfunctions/_IsPressed.htm )
While 1
If _IsPressed ("1B") Then
ProcessClose("bsnes.exe")
Exit
EndIf
WEnd
16)
Ctrl + F7 (this compile the superroadblaster.au3 as superroadblaster.exe )
17)
copy your compiled superroadblaster.exe to your bsnes-folder (where bsnes.exe is found)
18)
start superroadblaster.exe
19)
bsnes.exe starts the game SuperRoadBlaster automatically in Fullscreen. Moves the mouse cursor away. Now It's possible to close bsnes.exe by hitting ESC
NOTE:To complete the potential of autoit, it's possible to generate some kind of auto-installer. Please see picture.
e.g. you want to click OK-Button to continue an installation:
-starts Au3Info.exe > Options > uncheck Freeze
-click on tab : Visible Text
-starts installation file
-click in title bar of installation file to get it as current front window
-move mouse cursor over OK button
RED : the current title of current front window : Installer Language
GREEN : Class and Instances of Buttons and Controls : OK Button got the Class Button and Instance 1
Yellow : text, that gives the current front window : English, OK, Cancel, Please select a language
;waits for window with title : Installer Language, containing text : 'Please select a'. Is title and text correct, then script continue and clicks on Class Button with Instance 1 (OK-Button)
WinWaitActive("Installer Language","Please select a")
WinWait("Installer Language","Please select a")
ControlClick("Installer Language","Please select a", "[CLASS:Button; INSTANCE:1]")