2010-11-19, 10:58
sierra18 Wrote:do you know how i can set that up
Have a search through the forum, or start a new thread specifically asking about Eventghost. It has many devoted users hereabouts though I'm not one of them.
JR
sierra18 Wrote:do you know how i can set that up
sierra18 Wrote:I've got a standard Microsoft keyboard that has basic media buttons (play,stop,skip etc) i also like to multitask and listen to music while i am browsing on the internet. is there a way i could have basic music control in xbmc while it's minimized.
jhsrennie Wrote:Only by using something like Eventghost, which can route signals to XBMC even when it doesn't have the focus.
JR
sierra18 Wrote:do you know how i can set that up
jhsrennie Wrote:Have a search through the forum, or start a new thread specifically asking about Eventghost. It has many devoted users hereabouts though I'm not one of them.
JR
#include <TrayConstants.au3>
;Create Traymenü-----------------------------------------
Opt("TrayMenuMode", 3) ; Default tray menu items (Script Paused/Exit) will not be shown.
TraySetClick(16)
$TShow = TrayCreateItem("Show Kodi")
$THide = TrayCreateItem("Hide Kodi")
TrayCreateItem("")
$TExit = TrayCreateItem("Exit")
TraySetState()
TraySetToolTip("Kodi.aHide - klick to show/hide it :)")
Global $ix = 0
;-------------------------------------------------------
;Change it!
;sampling time--------------------------------------------
Global $itw = 20
;polling time (-Kodi is still active?)--------------------
Global $it , $its = 2000
;Pfad von Kodi--------------------------------------------
$Kodi = run ("C:\Program Files (x86)\Kodi\Kodi.exe")
;--------------------------------------------------------
; Wartet bis Kodi startet und verschiebt es gleich in den Tray (AutoTray at Start)
WinWait("Kodi" ,"", 20) ; Wait for start of Kodi (max 20s)
WinSetState("Kodi","",@SW_hide) ; minimize Kodi
;------------------------------------------------------
;Abfrageschleife---------------------------------------
While Sleep ($itw)
$msg = TrayGetMsg()
Select
Case $msg = $TExit
Exit
Case $msg = $THide
$ix = 0
WinSetState("Kodi","",@SW_hide)
Case $msg = $TShow
WinSetState("Kodi","",@SW_show)
$ix = 1
Case $msg = $TRAY_EVENT_PRIMARYDOWN
If $ix = 1 then
WinSetState("Kodi","",@SW_hide)
$ix = 0
Else
WinSetState("Kodi","",@SW_show)
$ix = 1
endif
EndSelect
;Wenn Kodi beendet, auch TrayProg beenden------------
If $it = ($its/$itw) Then
$it = 0
If not ProcessExists($Kodi) and not ProcessExists("Kodi.exe") then
exit
endif
Else
$it = ($it+1)
EndIf
;---------------------------------------------------
WEnd