TaskMonitorPlus plugin - v0.0.5

Questions and comments specific to a particular plugin should go here.
User avatar
Boolean263
Plugin Developer
Posts: 81
Joined: Sat Aug 12, 2017 7:52 pm
Location: Ottawa, Canada
Contact:

TaskMonitorPlus plugin - v0.0.5

Post by Boolean263 » Tue Aug 29, 2017 9:18 pm

Version 0.0.3 is out! Adds the TitleChanged event, and a boatload of useful window management functions from kgschlosser. Also removes the DLL, since it's apparently not needed (thanks again kgschlosser!).

Version 0.0.4 is out! This one just has some under-the-hood tweaks based on feedback from kgschlosser. Mainly, if your window has "" as its title, you'll be able to tell.

Version 0.0.5 is out! This incorporates a fix for the freezing issue topix reported.

Task Monitor Plus is a fork/expansion of the Task Monitor (aka simply Task) plugin that ships with EventGhost. Like the original Task Monitor plugin, Task Monitor Plus generates events when a window opens, closes, flashes, or gains or loses focus. The "Plus" is in the payload: events generated by this plugin come with a payload which gives more details about the window in question. (From v0.0.3 there's also a new event fired when a window's title changes.)

The two most interesting attributes of this payload are `eg.event.payload.title`, which contains the window title, and `eg.event.payload.window_class`, which contains the internal class name for the window. Some programs use different classes for the different types of windows they generate, so this field may be useful for acting only on the windows you want.

The source code for Task Monitor Plus is on github at Boolean263/EventGhost-TaskMonitorPlus. This is also where you'll find full documentation and a complete changelog. I accept feedback and pull requests there, as well as offering support in this thread.

This plugin is based on the 1.0.4 version of the original Task Monitor plugin, which was written by Bitmonster and blackwind. My inspiration to create this fork was to fill in the shortcomings of my older WindowWatcher plugin, which is now deprecated.
Attachments
TaskMonitorPlus-0.0.5.egplugin
(10.21 KiB) Downloaded 64 times
TaskMonitorPlus-0.0.4.egplugin
(10.06 KiB) Downloaded 53 times
TaskMonitorPlus-0.0.3.egplugin
(9.93 KiB) Downloaded 36 times
TaskMonitorPlus-0.0.2.egplugin
(31.2 KiB) Downloaded 43 times
Last edited by Boolean263 on Sat Sep 09, 2017 3:44 pm, edited 3 times in total.
Windows 10 Home, version 1703, build 15063.540 · EventGhost 0.5.0-rc4 · wxPython 3.0.2.0
Python programmer for fun and profit. Dabbler in EventGhost plugin writing. Wiki gardener. General geek.

User avatar
Boolean263
Plugin Developer
Posts: 81
Joined: Sat Aug 12, 2017 7:52 pm
Location: Ottawa, Canada
Contact:

Re: TaskMonitorPlus plugin - v0.0.2

Post by Boolean263 » Sat Sep 02, 2017 4:05 pm

Version 0.0.2 is a bugfix release. 0.0.1 would spew errors into the EG event log if it tried to show events for windows which had unicode characters in their title. This version "fixes" that by using `repr()` to report the title to the event log.
Windows 10 Home, version 1703, build 15063.540 · EventGhost 0.5.0-rc4 · wxPython 3.0.2.0
Python programmer for fun and profit. Dabbler in EventGhost plugin writing. Wiki gardener. General geek.

User avatar
Neytrino-OnLine
Experienced User
Posts: 76
Joined: Tue Aug 20, 2013 7:14 pm
Location: Moscow, Russia

Re: TaskMonitorPlus plugin - v0.0.2

Post by Neytrino-OnLine » Sun Sep 03, 2017 12:36 pm

Hi, so I installed latest version, added to a configuration, and it doesn't generate any events... EG 0.5.0rc4
Sin©erely yours, Neytrino.

User avatar
Boolean263
Plugin Developer
Posts: 81
Joined: Sat Aug 12, 2017 7:52 pm
Location: Ottawa, Canada
Contact:

Re: TaskMonitorPlus plugin - v0.0.2

Post by Boolean263 » Sun Sep 03, 2017 2:58 pm

Neytrino-OnLine wrote:Hi, so I installed latest version, added to a configuration, and it doesn't generate any events... EG 0.5.0rc4
How did you add it to a configuration? The screenshots in your other post were really handy, could you give a screenshot or two showing what you're doing here?
Windows 10 Home, version 1703, build 15063.540 · EventGhost 0.5.0-rc4 · wxPython 3.0.2.0
Python programmer for fun and profit. Dabbler in EventGhost plugin writing. Wiki gardener. General geek.

User avatar
Neytrino-OnLine
Experienced User
Posts: 76
Joined: Tue Aug 20, 2013 7:14 pm
Location: Moscow, Russia

Re: TaskMonitorPlus plugin - v0.0.2

Post by Neytrino-OnLine » Sun Sep 03, 2017 3:59 pm

I didn't think that I have any options (how to make it), but Ok, so:
I have downloaded TaskMonitorPlus-0.0.2-file from the first post, have twice clicked on it,
Image
Then - Ok, then right click on configuration tree / Add plugin...
Image
Then choose plugin, Ok...
Image
And it in a configuration... But there is no any events about windows or tasks...
p.s. EG has been purely installed today...
Sin©erely yours, Neytrino.

User avatar
Boolean263
Plugin Developer
Posts: 81
Joined: Sat Aug 12, 2017 7:52 pm
Location: Ottawa, Canada
Contact:

Re: TaskMonitorPlus plugin - v0.0.2

Post by Boolean263 » Sun Sep 03, 2017 4:31 pm

Neytrino-OnLine wrote:And it in a configuration... But there is no any events about windows or tasks...
p.s. EG has been purely installed today...
Remove Task Monitor Plus from your plugin list, and install the basic Task Monitor that comes with EventGhost. Let me know if you get any events from that one.
Windows 10 Home, version 1703, build 15063.540 · EventGhost 0.5.0-rc4 · wxPython 3.0.2.0
Python programmer for fun and profit. Dabbler in EventGhost plugin writing. Wiki gardener. General geek.

User avatar
Neytrino-OnLine
Experienced User
Posts: 76
Joined: Tue Aug 20, 2013 7:14 pm
Location: Moscow, Russia

Re: TaskMonitorPlus plugin - v0.0.2

Post by Neytrino-OnLine » Sun Sep 03, 2017 5:04 pm

Boolean263, there is no any actions with standard plugin...
Sin©erely yours, Neytrino.

User avatar
Boolean263
Plugin Developer
Posts: 81
Joined: Sat Aug 12, 2017 7:52 pm
Location: Ottawa, Canada
Contact:

Re: TaskMonitorPlus plugin - v0.0.2

Post by Boolean263 » Sun Sep 03, 2017 5:43 pm

Neytrino-OnLine wrote:Boolean263, there is no any actions with standard plugin...
If you had gotten events from the standard plugin, then it would have meant I broke something in my plugin. But if you aren't getting events from either one, then it sounds like there's something broken about your overall setup.

My ability to help here will be a bit limited. Maybe kgschlosser or topix can step in? But let's see what I can do.

Let's start with the standard plugin. Keep Task Monitor installed/enabled, and TaskMonitorPlus disabled/removed.

Under the View menu, turn on Log Debug Info (sorry, I don't know what the Russian equivalents would be!), then restart EventGhost. See if any error messages appear about Task Monitor, and we'll work from there.
Windows 10 Home, version 1703, build 15063.540 · EventGhost 0.5.0-rc4 · wxPython 3.0.2.0
Python programmer for fun and profit. Dabbler in EventGhost plugin writing. Wiki gardener. General geek.

User avatar
Neytrino-OnLine
Experienced User
Posts: 76
Joined: Tue Aug 20, 2013 7:14 pm
Location: Moscow, Russia

Re: TaskMonitorPlus plugin - v0.0.2

Post by Neytrino-OnLine » Sun Sep 03, 2017 5:58 pm

So, this is start with debug events...

Code: Select all

20:50:50: 0 MainThread: PluginManager.ScanAllPlugins :1.4985375174633435
20:50:50: 0 MainThread: SendKeysParser.__init__()
20:50:50: 0 EventGhost.Pipe.Thread: Named Pipe: Creating security descriptor
20:50:50: 0 EventGhost.Pipe.Thread: Named Pipe: Creating pipe
20:50:50: 0 MainThread: Document.ShowFrame()
20:50:50: 0 MainThread: Document.ShowFrame => None
---> Welcome to EventGhost <---
20:50:52: 0 EventThread: EventThread.StartSession(filename=u'P:\\Profiles\\EventGhost\\Rino-HT 4.0.xml')
20:50:52: 0 ActionThread: ActionThread.StartSession(filename=u'P:\\Profiles\\EventGhost\\Rino-HT 4.0.xml')
20:50:52: 0 Thread-1: SessionChangeNotifier.Register()
20:50:52: 0 MouseThread: MouseThread.run()
20:50:52: 0 ActionThread: Document.Load(filePath=u'P:\\Profiles\\EventGhost\\Rino-HT 4.0.xml')
20:50:52: 1 MainThread: OSDFrame.__init__(parent=None)
20:50:52: 0 ActionThread: StartLoad(cls=<class 'eg.Classes.TreeLink.TreeLink'>)
20:50:52: 0 MainMessageReceiver: PowerBroadcastNotifier.OnPowerBroadcast(hwnd=1706728, uMsg=536L, wParam=32787L, lParam=6817256)
20:50:52: 0 MainMessageReceiver: PowerBroadcastNotifier.OnPowerBroadcast(hwnd=1706728, uMsg=536L, wParam=32787L, lParam=6816712)
20:50:52: 0 MainMessageReceiver: PowerBroadcastNotifier.OnPowerBroadcast(hwnd=1706728, uMsg=536L, wParam=32787L, lParam=6817096)
20:50:52: 0 MainMessageReceiver: PowerBroadcastNotifier.OnPowerBroadcast(hwnd=1706728, uMsg=536L, wParam=32787L, lParam=6847944)
20:50:52: 0 ActionThread: Document.SetExpandState(expanded=set([0, 128, 387, 4, 7, 12, 143, 22, 23, 132, 27, 423, 424, 42, 46, 50, 54, 440, 58, 62, 67, 76, 80, 87, 217, 105, 109, 113, 120, 124]))
20:50:52: 0 ActionThread: XML loaded in 0.233638 seconds.
20:50:52: 1 MainThread: TreeCtrl.OnItemCollapsingEvent(event=<wx.TreeEvent>)
Autostart
   Run Application: nircmd.exe
   Plugin: Microsoft MCE Remote (Vista+)
      20:50:52: 0 ActionThread: MCE_Vista.__start__()
      20:50:52: 0 Thread-5: MceMessageReceiver.__call__()
   Plugin: Desktop Remote
   Plugin: SchedulGhost
   MCE_Vista: Connected to MceIr pipe, started handling IR events
   Plugin: AudioEndpoint
      Audio Endpoint plugin started.
   Plugin: TrayTip
   Plugin: Task Monitor
20:50:52: 0 ActionThread: ActionThread.StartSession => None
System.PowerProfile.Balanced
MceRemote.Connected
AudioEndpoint.Default.Render.Console.Динамики (Display Audio) [u'{0.0.0.00000000}.{b077439b-ba23-4465-9a29-275021e3ac29}']
AudioEndpoint.Default.Render.Multimedia.Динамики (Display Audio) [u'{0.0.0.00000000}.{b077439b-ba23-4465-9a29-275021e3ac29}']
AudioEndpoint.Default.Render.Communications.Динамики (Display Audio) [u'{0.0.0.00000000}.{b077439b-ba23-4465-9a29-275021e3ac29}']
AudioEndpoint.Default.Capture.Console.Микрофон (Display Audio) [u'{0.0.1.00000000}.{f52b8d20-6bd8-4037-a213-2d6c0fb8605f}']
AudioEndpoint.Default.Capture.Multimedia.Микрофон (Display Audio) [u'{0.0.1.00000000}.{f52b8d20-6bd8-4037-a213-2d6c0fb8605f}']
AudioEndpoint.Default.Capture.Communications.Микрофон (Display Audio) [u'{0.0.1.00000000}.{f52b8d20-6bd8-4037-a213-2d6c0fb8605f}']
Main.OnInit
   Initialization
      Play Sound: P:\Profiles\EventGhost\Speech Off.wav
System.PowerSaving.Off
System.PowerSource.Line
System.Monitor.On
20:50:52: 1 MainThread: MainFrame.OnClose(dummyEvent=<wx.CloseEvent>)
20:50:52: 1 MainThread: MainFrame.Iconize(flag=True)
20:50:52: 1 MainThread: Document.HideFrame()
20:50:52: 1 MainThread: MainFrame.Destroy()
20:50:52: 1 MainThread: LogCtrl.Destroy()
20:50:52: 1 MainThread: TreeCtrl.Destroy()
20:50:52: 1 MainThread: StatusBar.Destroy()
20:50:52: 1 MainThread: StatusBar.__del__()
20:50:52: 1 MainThread: MainFrame.Destroy => True
20:50:52: 1 MainThread: Document.HideFrame => None
20:50:52: 1 MainThread: LogCtrl.__del__()
20:50:52: 1 MainThread: MainFrame.__del__()
20:50:56: 1 MainThread: Document.ShowFrame()
20:50:56: 1 MainThread: TreeCtrl.OnItemCollapsingEvent(event=<wx.TreeEvent>)
20:50:56: 1 MainThread: Document.ShowFrame => None
Sin©erely yours, Neytrino.

User avatar
Boolean263
Plugin Developer
Posts: 81
Joined: Sat Aug 12, 2017 7:52 pm
Location: Ottawa, Canada
Contact:

Re: TaskMonitorPlus plugin - v0.0.2

Post by Boolean263 » Sun Sep 03, 2017 7:18 pm

Everything looks fine there to me. Sorry, I'm out of ideas! @kgschlosser?
Windows 10 Home, version 1703, build 15063.540 · EventGhost 0.5.0-rc4 · wxPython 3.0.2.0
Python programmer for fun and profit. Dabbler in EventGhost plugin writing. Wiki gardener. General geek.

User avatar
kgschlosser
Site Admin
Posts: 2891
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: TaskMonitorPlus plugin - v0.0.2

Post by kgschlosser » Sun Sep 03, 2017 7:47 pm

you need to enable debugging from the command line.

leave the quotes in place

close EG then open up a command prompt and paste this into it.

Code: Select all

"c:\program files (x86)\eventghost\eventghost.exe" -debug
This will start the debugging process right out of the gate so if there is an error we can see it. enabling debugging from the GUI only debugs information after the startup process of EG
If you like the work I have been doing then feel free to Image

User avatar
kgschlosser
Site Admin
Posts: 2891
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: TaskMonitorPlus plugin - v0.0.2

Post by kgschlosser » Sun Sep 03, 2017 7:48 pm

I would also like to know what version of EG you are running. as well as your windows version.
If you like the work I have been doing then feel free to Image

User avatar
Neytrino-OnLine
Experienced User
Posts: 76
Joined: Tue Aug 20, 2013 7:14 pm
Location: Moscow, Russia

Re: TaskMonitorPlus plugin - v0.0.2

Post by Neytrino-OnLine » Mon Sep 04, 2017 3:51 am

kgschlosser, Ok...

Code: Select all

06:41:28: 0 MainThread: ----------------------------------------
06:41:28: 0 MainThread:         EventGhost started
06:41:28: 0 MainThread: ----------------------------------------
06:41:28: 0 MainThread: EventGhost Version: 0.5.0-rc4
06:41:28: 0 MainThread: Machine type: AMD64
06:41:28: 0 MainThread: Processor: Intel64 Family 6 Model 42 Stepping 7, GenuineIntel
06:41:28: 0 MainThread: Architecture: ('32bit', 'WindowsPE')
06:41:28: 0 MainThread: Python:  2.7.12 CPython ('default', 'Oct 31 2016 18:42:08') [MSC v.1500 32 bit (Intel)]
06:41:28: 0 MainThread: ----------------------------------------
06:41:30: 0 MainThread: PluginManager.ScanAllPlugins :1.6338492410462573
06:41:30: 0 MainThread: SendKeysParser.__init__()
06:41:30: 0 EventGhost.Pipe.Thread: Named Pipe: Creating security descriptor
06:41:30: 0 EventGhost.Pipe.Thread: Named Pipe: Creating pipe
06:41:30: 0 MainMessageReceiver: MainMessageReceiver.__MainLoop()
06:41:30: 0 MainMessageReceiver: MainMessageReceiver.Setup()
06:41:30: 0 ActionThread: ActionThread.__MainLoop()
06:41:30: 0 EventThread: EventThread.__MainLoop()
---> Welcome to EventGhost <---
06:41:32: 0 EventThread: EventThread.StartSession(filename=u'P:\\Profiles\\EventGhost\\Rino-HT 4.0.xml')
06:41:32: 0 ActionThread: ActionThread.StartSession(filename=u'P:\\Profiles\\EventGhost\\Rino-HT 4.0.xml')
06:41:32: 1 MainThread: OSDFrame.__init__(parent=None)
06:41:32: 0 Thread-3: SessionChangeNotifier.Register()
06:41:32: 0 MainMessageReceiver: PowerBroadcastNotifier.OnPowerBroadcast(hwnd=331174, uMsg=536L, wParam=32787L, lParam=7163112)
06:41:32: 0 MainMessageReceiver: PowerBroadcastNotifier.OnPowerBroadcast(hwnd=331174, uMsg=536L, wParam=32787L, lParam=7163592)
06:41:32: 0 MainMessageReceiver: PowerBroadcastNotifier.OnPowerBroadcast(hwnd=331174, uMsg=536L, wParam=32787L, lParam=7163368)
06:41:32: 0 MainMessageReceiver: PowerBroadcastNotifier.OnPowerBroadcast(hwnd=331174, uMsg=536L, wParam=32787L, lParam=7131984)
06:41:32: 0 MouseThread: MouseThread.run()
06:41:32: 0 ActionThread: Document.Load(filePath=u'P:\\Profiles\\EventGhost\\Rino-HT 4.0.xml')
06:41:32: 0 ActionThread: StartLoad(cls=<class 'eg.Classes.TreeLink.TreeLink'>)
06:41:32: 0 ActionThread: Document.SetExpandState(expanded=set([0, 128, 387, 4, 7, 12, 143, 22, 23, 132, 27, 423, 424, 42, 46, 50, 54, 440, 58, 62, 67, 76, 80, 87, 217, 105, 109, 113, 120, 124]))
06:41:32: 0 ActionThread: XML loaded in 0.235264 seconds.
Autostart
   Run Application: nircmd.exe
   Plugin: Microsoft MCE Remote (Vista+)
      06:41:32: 0 ActionThread: MCE_Vista.__start__()
      06:41:32: 0 Thread-5: MceMessageReceiver.__call__()
   Plugin: Desktop Remote
      MCE_Vista: Connected to MceIr pipe, started handling IR events
   Plugin: SchedulGhost
   Plugin: AudioEndpoint
      Audio Endpoint plugin started.
   Plugin: TrayTip
   Plugin: Task Monitor
06:41:33: 0 ActionThread: ActionThread.StartSession => None
System.PowerProfile.Balanced
MceRemote.Connected
AudioEndpoint.Default.Render.Console.Динамики (Display Audio) [u'{0.0.0.00000000}.{b077439b-ba23-4465-9a29-275021e3ac29}']
AudioEndpoint.Default.Render.Multimedia.Динамики (Display Audio) [u'{0.0.0.00000000}.{b077439b-ba23-4465-9a29-275021e3ac29}']
AudioEndpoint.Default.Render.Communications.Динамики (Display Audio) [u'{0.0.0.00000000}.{b077439b-ba23-4465-9a29-275021e3ac29}']
AudioEndpoint.Default.Capture.Console.Микрофон (Display Audio) [u'{0.0.1.00000000}.{f52b8d20-6bd8-4037-a213-2d6c0fb8605f}']
AudioEndpoint.Default.Capture.Multimedia.Микрофон (Display Audio) [u'{0.0.1.00000000}.{f52b8d20-6bd8-4037-a213-2d6c0fb8605f}']
AudioEndpoint.Default.Capture.Communications.Микрофон (Display Audio) [u'{0.0.1.00000000}.{f52b8d20-6bd8-4037-a213-2d6c0fb8605f}']
Main.OnInit
   Initialization
      Play Sound: P:\Profiles\EventGhost\Speech Off.wav
System.PowerSaving.Off
System.PowerSource.Line
System.Monitor.On
06:41:37: 1 MainThread: Document.ShowFrame()
06:41:37: 1 MainThread: Log.GetData()
06:41:37: 1 MainThread: TreeCtrl.OnItemCollapsingEvent(event=<wx.TreeEvent>)
06:41:37: 1 MainThread: Document.ShowFrame => None
Image
Sin©erely yours, Neytrino.

User avatar
kgschlosser
Site Admin
Posts: 2891
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: TaskMonitorPlus plugin - v0.0.2

Post by kgschlosser » Mon Sep 04, 2017 4:59 am

and when you click on another window when EG is open nothing happens?
If you like the work I have been doing then feel free to Image

User avatar
Neytrino-OnLine
Experienced User
Posts: 76
Joined: Tue Aug 20, 2013 7:14 pm
Location: Moscow, Russia

Re: TaskMonitorPlus plugin - v0.0.2

Post by Neytrino-OnLine » Mon Sep 04, 2017 5:08 am

kgschlosser wrote:and when you click on another window when EG is open nothing happens?
Yes...
Sin©erely yours, Neytrino.

Post Reply