2012-07-09, 02:14
(2012-07-09, 00:12)chris295 Wrote: I tried the new code and it has the same issues with the mouse pointer appearing on top of the GUI, XBMC not restoring after the application is closed and the windows flashing through. I think what I want might not be possible with AutoIt, or at least not possible with an image. Perhaps with the monitor_off/on commands? But not sure if puts hardware strain.
Ok... if Autoit is not able to do it by itself we will use small application for that. I have found the small nomousy application that allow to show/hide the mouse cursor using command line. So download the nomousy1.3.zip archive file and extract its 2 files into C:\WINDOWS directory. Then use a script like this :
Code:
#Include <GUIConstantsEx.au3>
#Include <WindowsConstants.au3>
HotKeySet("{ESC}", "Terminate")
If $CmdLine[0] == 1 Then
Run("nomousy.exe /hide", "", @SW_HIDE)
GUICreate('MyGUI', @DesktopWidth, @DesktopHeight, 0, 0, BitOR($WS_POPUP, $WS_EX_TOPMOST))
GUICtrlCreatePic('C:\Program Files (x86)\snes9x\loading_wallpaper.gif', 0, 0, @DesktopWidth, @DesktopHeight)
GUISetState()
Run("pssuspend XBMC.exe", "", @SW_HIDE)
Run( '"C:\Program Files (x86)\snes9x\snes9x-x64.exe" -fullscreen -autostart "' & $CmdLine[1] & '"', "", @SW_HIDE)
While 1
Sleep(100)
WEnd
EndIf
Terminate
Func Terminate()
GUISetState()
ProcessClose( "snes9x-x64.exe" )
Run("pssuspend -r XBMC.exe", "", @SW_HIDE)
WinSetState("XBMC", "", @SW_MAXIMIZE)
Run("nomousy.exe", "", @SW_HIDE)
Exit 0
EndFunc
Take care to remove the Opt("WinTitleMatchMode", 2) line from your script. I think it is why XBMC is not restored correctly at the end. I'm still investigating into a solution to replace the transition screen. But... honestly... On my Windows 7 system this previous script works perfectly.