2012-07-07, 23:58
I'm using a slightly modified version of john.doe's script and it is a huge improvement over what I had. With the SW_Hide parameter and the _MouseTrap parameter, the cursor is no longer randomly appearing and launching feels overall more responsive because of the WinSetOnTop parameter. The prompt windows no longer show as well, which accomplishes most of what I wanted.
The only thing I would like to change is after I launch for about 1-2 seconds you can still see the XBMC window in the center of the desktop. I would prefer to show a black screen to make launching feel more seemless. Since the XBMC window is in front of the desktop, changing the wallpaper would only fix part of the problem. It's not really a huge problem, just a minor thing and if it's not easily fixed it's not a must. In any case, it's way better than the 3-4 windows it cycled through before during the launching process.
Here is my script for Snes9x. I wasn't sure if I needed to leave the <Misc.au3> tag in the include since I don't actually have a Misc.au3 but I don't really know how includes work. Maybe you could clean it up a little bit for me and take out the redundancies if any exist? Either way, the script is doing what it's supposed to.
I can see where using the Monitor script could work perfectly for what I want. It seems complicated for me but I will toy with it later and let you know. But how does this script turn the monitor off/on? Does it actually turn the monitor off or just use some sort of function to simulate turning it off? It seems like if it actually turns the display off, that would put hardware strain when used over a long period of time. Is it safe to use? I was thinking more along the lines of using the Splash command, but I guess AutoIt doesn't have as mature of a Splash command as AutoHotKey. As for using AutoHotKey to do this, I wouldn't even know how to begin and it seems like more trouble than it's worth to use multiple scripts and the AutoIt script is working too well for me to convert to AHK now.
Again, thanks for all the help, sorry for making things complicated.
The only thing I would like to change is after I launch for about 1-2 seconds you can still see the XBMC window in the center of the desktop. I would prefer to show a black screen to make launching feel more seemless. Since the XBMC window is in front of the desktop, changing the wallpaper would only fix part of the problem. It's not really a huge problem, just a minor thing and if it's not easily fixed it's not a must. In any case, it's way better than the 3-4 windows it cycled through before during the launching process.
Here is my script for Snes9x. I wasn't sure if I needed to leave the <Misc.au3> tag in the include since I don't actually have a Misc.au3 but I don't really know how includes work. Maybe you could clean it up a little bit for me and take out the redundancies if any exist? Either way, the script is doing what it's supposed to.
Code:
#include <Misc.au3>
HotKeySet("{ESC}", "Terminate")
Opt("WinTitleMatchMode", 2)
$app = "G:\xbmc\games\snes\snes9x-x64.exe"
$winname = "snes9x"
If $CmdLine[0] == 1 Then
WinSetOnTop("XBMC", "", 1)
Run("pssuspend XBMC.exe", "", @SW_HIDE)
Run($app & ' "' & $CmdLine[1] & '"',"",@SW_HIDE)
WinWait($winname,"")
WinActivate($winname,"")
WinSetOnTop($winname, "", 1)
WinWaitActive($winname,"")
SendKeepActive($winname,"")
_MouseTrap(@DesktopWidth, @DesktopHeight, @DesktopWidth, @DesktopHeight)
While 1
Sleep(100)
WEnd
EndIf
Func Terminate()
ProcessClose( "snes9x-x64.exe" )
ProcessWaitClose( "snes9x-x64.exe" )
Run("pssuspend -r XBMC.exe", "", @SW_HIDE)
WinSetOnTop("XBMC", "", 0)
Exit 0
EndFunc
I can see where using the Monitor script could work perfectly for what I want. It seems complicated for me but I will toy with it later and let you know. But how does this script turn the monitor off/on? Does it actually turn the monitor off or just use some sort of function to simulate turning it off? It seems like if it actually turns the display off, that would put hardware strain when used over a long period of time. Is it safe to use? I was thinking more along the lines of using the Splash command, but I guess AutoIt doesn't have as mature of a Splash command as AutoHotKey. As for using AutoHotKey to do this, I wouldn't even know how to begin and it seems like more trouble than it's worth to use multiple scripts and the AutoIt script is working too well for me to convert to AHK now.
Again, thanks for all the help, sorry for making things complicated.