Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;Win-Alt-Enter is the shortcut for greenbutton on the MCE Remote for Win64bit
- #!Enter::
- IfWinNotExist XBMC.exe ;If XBMC is shutdown
- Run C:\Program Files (x86)\XBMC 11\XBMC.exe ;Start it
- WinWait,XBMC,,8 ;wait for 8 seconds for XBMC to launch "increase the time if the script times out on your system"
- If ErrorLevel ;Display an error if XBMC does not load in time.
- {
- MsgBox, XBMC Startup timed out.
- return
- }
- WinActivate ;Activate and Refocus XBMC.
- WinShow ;Bring XBMC to front.
- WinGet, Style, Style, ahk_class XBMC
- if (Style & 0xC00000) ;Detects if XBMC has a title bar.
- {
- Send {VKDC} ;Maximize XBMC to fullscreen mode if its in a window mode.
- }
- Return
- SetTitleMatchMode 2
- #IfWinActive XBMC ahk_class XBMC ; XBMC detection for XBMC/GSB Home Screen action.
- #!Enter::
- WinGet, Style, Style, ahk_class XBMC
- if (Style & 0xC00000) ;0xC00000 is WS_CAPTION, meaning window has a title bar.
- {
- Send {VKDC} ;Maximize XBMC to fullscreen mode if its in a window mode.
- }
- WinMaximize ;Maximize XBMC if Windowed.
- send, ^!{VK74} ; if XBMC is Active (GSB Home Jump will activate)
- Return
- #IfWinActive ;
- ;Swap/Extend/activate & disable 2nd monitors script.
- ;Can be used by mapping one of your Remote buttons to [Control+F11] without the brackets.
- ^VK7A::
- if toggle := !toggle
- run % "displayswitch /" "extend"
- else
- run % "displayswitch /" "external"
- return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement