2018-05-02, 03:15
I use a script (below) for the "green button" on my remote to open kodi. but after updating to 17.6 it will open it but doesnt seem to make it the active window so i cant control kodi. when i had this issue (rarely) with v16 i used to press the button again and it would make it active and all worked. but now it wont even make it active again so i have to go to the keyboard and click on the kodi windo to be able to use my remote.
how does everybody else deal with opening kodi and not have this issue?
how does everybody else deal with opening kodi and not have this issue?
Quote:;Written by EliteGamer360, Please give credit When you Copy and use my scripts for any other purpose.
#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 kodi.exe ;If kodi 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\kodi\kodi.exe" : ARM=9 ? "C:\Program Files (x86)\kodi\kodi.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 kodi.
WinShow ;Bring kodi to front.
WinGet, Style, Style, ahk_class kodi
if (Style & 0xC00000) ;0xC00000 is WS_CAPTION, meaning window has a title bar.
{
Send {VKDC} ;Maximize kodi to fullscreen mode if its in a window mode.
}
Return
SetTitleMatchMode 2
#IfWinActive kodi ahk_class kodi ; kodi detection for kodi/GSB Home Screen action.
^!Enter::
WinGet, Style, Style, ahk_class kodi
if (Style & 0xC00000) ;0xC00000 is WS_CAPTION, meaning window has a title bar.
{
Send {VKDC} ;Maximize kodi to fullscreen mode if its in a window mode.
}
;WinMaximize ;Maximize kodi if Windowed.
send, ^!{VK74} ; if kodi is Active (GSB Home Jump will activate)
Return
#IfWinActive ;
Return
;Written by EliteGamer360, Please give credit When you Copy and use my scripts for any other purpose.
;Copyright @ kodiCUSTOMREGIS.SOURCEFORGE.NET