Kodi Community Forum

Full Version: generate and/or react to events
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi @all,

is it possible to make a python script generate xbmc announcements/events like:

12:41:34 T:3592 DEBUG: CAnnouncementManager - Announcement: OnScreensaverActivated from xbmc
12:41:34 T:3592 DEBUG: GOT ANNOUNCEMENT, type: 4, from xbmc, message OnScreensaverActivated

or is it possible to make a script detect/react to events like:

12:41:37 T:3592 DEBUG: CWinEventsWin32::WndProcWindow is active
12:41:37 T:3592 DEBUG: CWinEventsWin32::WndProc: Focus switched to process C:\Windows\explorer.exe
12:41:41 T:3592 DEBUG: CWinEventsWin32::WndProcWindow is active

regards,

SlrG
Yes - and no Big Grin

You can react on Announcements (like the "OnScreensaverActivated"-Announcement) using the xbmc.Monitor base-class. But you can't react on events which are not implemented in the AnnouncementManager (like the Focus switch).
@sphere:

Thank you for your answer. Smile