Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;Written by EliteGamer360, Please give credit When you Copy and use my scripts for any other purpose.
- ;Script source is http://xbmccustomregis.sourceforge.net/features.html
- #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
- SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
- SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
- #SingleInstance, Force
- ^!Enter:: ;Ctrl-Alt-Enter is the shortcut for greenbutton_Win64bit
- IfWinNotExist XBMC.exe ;If XBMC is not running
- VarSetCapacity(si,44)
- DllCall("GetNativeSystemInfo", "uint", &si)
- if ErrorLevel {
- MsgBox Windows XP or later required.
- ExitApp
- }
- ARM := NumGet(si,0,"ushort")
- run % ARM=0 ? "C:\Program Files\XBMC\XBMC.exe" : ARM=9 ? "C:\Program Files (x86)\XBMC\XBMC.exe" : ARM=6 ? "IA64" : "Unknown System"
- f (ARM = 0)
- {
- 32or64 := "32bit"
- }
- If (ARM = 9)
- {
- 32or64 := "64bit"
- }
- If (ARM = 6)
- {
- 32or64 := "Unknown System"
- }
- WinActivate ;Activate and Refocus XBMC.
- WinShow ;Bring XBMC to front.
- 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.
- }
- 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 ;
- ^F11:: ;Swap/Extend/activate monitors script
- if toggle := !toggle
- run % "displayswitch /" "extend"
- else
- run % "displayswitch /" "external"
- Run, mmsys.cpl
- WinWait,Sound
- ControlSend,SysListView321,{Down3}
- ControlGet, isEnabled, Enabled,,&Set Default
- if(!isEnabled)
- {
- ControlSend,SysListView321,{Down}
- }
- ControlClick,&Set Default
- ControlClick,OK
- WinWaitClose
- SoundPlay, *-1
- return
- ^VK7B:: ; CTRL+F12 to activate/deactivate SmartFocus
- KeepWinZRunning := (KeepWinZRunning || KeepWinZRunning = "") ? False : True
- if (!KeepWinZRunning)
- {
- SoundPlay, %A_AppData%\Xbmccustomregis\smartfocusactivated.mp3
- SetTimer, WindowCheck, 20
- }
- Else
- SoundPlay, %A_AppData%\Xbmccustomregis\smartfocusdeactivated.mp3
- Return
- WindowCheck: ; Below checks if the XBMC window is activate
- If WinExist("XBMC") && !WinActive("XBMC")
- {
- WinActivate, XBMC
- WinMaximize, XBMC
- }
- if (KeepWinZRunning) ; The user signaled the loop to stop by pressing CTRL+F12 again.
- SetTimer, WindowCheck, Off ; Break out of this loop.
- Return
- ;Written by EliteGamer360, Please give credit When you Copy and use my scripts for any other purpose.
- ;Copyright @ XBMCCUSTOMREGIS.SOURCEFORGE.NET
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement