Page 2 of 6

Re: TaskMonitorPlus plugin - v0.0.2

Posted: Mon Sep 04, 2017 8:22 am
by kgschlosser
ok i am firing up my VM of windows 10. I am going to give it a test

Re: TaskMonitorPlus plugin - v0.0.2

Posted: Mon Sep 04, 2017 5:51 pm
by topix
Crazy thing: I installed TMP and i've got events. I was curious and installed TM also. Now i have two events: with and without payload. And now: deactivate TM and voila: TMP also receives no more events !!!

From looking at the code, the problem might be, that both plugin uses eg.messageReceiver.hwnd to receive messages from windows. So if one plugin gets deactivated, the other also can't get any more messages.

Solution:
Only add one of the two plugins to your tree.

Re: TaskMonitorPlus plugin - v0.0.2

Posted: Mon Sep 04, 2017 7:08 pm
by kgschlosser
ahhh OK.

I have submitted the code changes to handle this problem to the plugin author. so when he/she is around I am sure it will be added.

Re: TaskMonitorPlus plugin - v0.0.2

Posted: Wed Sep 06, 2017 5:33 am
by kgschlosser
well here is some news.. the hook.dll is a dead stick. it doesn't work and isn't necessary. that is the reason why when you have both installed and disable one of them the events stop for both. that is because it unregisters the hwnd for the messageReceiver window. and that would be global. I removed all of the lines of code for the taskhook.dl and the plugin functions as it should. I also check to see when RegisterShellHookWindow was implemented. and it goes all the way back to windows 2k so it's not a window version thing either.

so that bunch of it can be removed

Re: TaskMonitorPlus plugin - v0.0.2

Posted: Wed Sep 06, 2017 11:17 am
by Boolean263
kgschlosser wrote:well here is some news.. the hook.dll is a dead stick. it doesn't work and isn't necessary. that is the reason why when you have both installed and disable one of them the events stop for both. that is because it unregisters the hwnd for the messageReceiver window. and that would be global. I removed all of the lines of code for the taskhook.dl and the plugin functions as it should. I also check to see when RegisterShellHookWindow was implemented. and it goes all the way back to windows 2k so it's not a window version thing either.

so that bunch of it can be removed
Good find! I look forward to your next pull request which removes the code regarding taskhook.dll. I tried writing a plugin that didn't use a DLL (remember WindowWatcher?) but couldn't get Windows to send me event messages, so I had to poll for changes in a loop.

Re: TaskMonitorPlus plugin - v0.0.3

Posted: Fri Sep 08, 2017 2:52 am
by Boolean263
Version 0.0.3 of Task Monitor Plus is out! It adds a bunch of useful window-management functions from kgschlosser. It also removes the hook DLL since, as kgschlosser found, it's not needed. There's also a new event that fires when a window's title changes. (The payload contains the new title.)

The API has changed on the WindowInfo object, but the only breaking changes are the removal of is_visible and is_enabled, which I don't think anyone was using. You should be able to load this new version into EventGhost without having to redo any of your macros.

Re: TaskMonitorPlus plugin - v0.0.3

Posted: Fri Sep 08, 2017 1:00 pm
by Neytrino-OnLine
Still no events :(

Code: Select all

15:58:09: 0 MainThread: ----------------------------------------
15:58:09: 0 MainThread:         EventGhost started
15:58:09: 0 MainThread: ----------------------------------------
15:58:09: 0 MainThread: EventGhost Version: 0.5.0-rc4
15:58:09: 0 MainThread: Machine type: AMD64
15:58:09: 0 MainThread: Processor: Intel64 Family 6 Model 42 Stepping 7, GenuineIntel
15:58:09: 0 MainThread: Architecture: ('32bit', 'WindowsPE')
15:58:09: 0 MainThread: Python:  2.7.12 CPython ('default', 'Oct 31 2016 18:42:08') [MSC v.1500 32 bit (Intel)]
15:58:09: 0 MainThread: ----------------------------------------
15:58:11: 0 MainThread: PluginManager.ScanAllPlugins :1.64435002151115
15:58:11: 0 MainThread: SendKeysParser.__init__()
15:58:11: 0 EventGhost.Pipe.Thread: Named Pipe: Creating security descriptor
15:58:11: 0 EventGhost.Pipe.Thread: Named Pipe: Creating pipe
15:58:11: 0 MainMessageReceiver: MainMessageReceiver.__MainLoop()
15:58:11: 0 MainMessageReceiver: MainMessageReceiver.Setup()
15:58:11: 0 ActionThread: ActionThread.__MainLoop()
15:58:11: 0 EventThread: EventThread.__MainLoop()
---> Welcome to EventGhost <---
15:58:13: 0 EventThread: EventThread.StartSession(filename=u'P:\\Profiles\\EventGhost\\Rino-HT 4.0.xml')
15:58:13: 0 ActionThread: ActionThread.StartSession(filename=u'P:\\Profiles\\EventGhost\\Rino-HT 4.0.xml')
15:58:13: 1 MainThread: OSDFrame.__init__(parent=None)
15:58:13: 0 MainMessageReceiver: PowerBroadcastNotifier.OnPowerBroadcast(hwnd=594664, uMsg=536L, wParam=32787L, lParam=5349400)
15:58:13: 0 MainMessageReceiver: PowerBroadcastNotifier.OnPowerBroadcast(hwnd=594664, uMsg=536L, wParam=32787L, lParam=5349528)
15:58:13: 0 MainMessageReceiver: PowerBroadcastNotifier.OnPowerBroadcast(hwnd=594664, uMsg=536L, wParam=32787L, lParam=5349464)
15:58:13: 0 MouseThread: MouseThread.run()
15:58:13: 0 ActionThread: Document.Load(filePath=u'P:\\Profiles\\EventGhost\\Rino-HT 4.0.xml')
15:58:13: 0 MainMessageReceiver: PowerBroadcastNotifier.OnPowerBroadcast(hwnd=594664, uMsg=536L, wParam=32787L, lParam=5479888)
15:58:13: 0 ActionThread: StartLoad(cls=<class 'eg.Classes.TreeLink.TreeLink'>)
15:58:13: 0 Thread-3: SessionChangeNotifier.Register()
15:58:13: 0 ActionThread: Document.SetExpandState(expanded=set([128, 4, 7, 12, 143, 22, 23, 132, 27, 34, 42, 46, 50, 437, 54, 58, 62, 67, 438, 455, 456, 457, 76, 80, 87, 217, 105, 109, 113, 120, 124]))
15:58:13: 0 ActionThread: XML loaded in 0.347849 seconds.
Autostart
Run Application: nircmd.exe
Plugin: Task Monitor Plus
Plugin: Microsoft MCE Remote (Vista+)
15:58:13: 0 ActionThread: MCE_Vista.__start__()
15:58:13: 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
15:58:13: 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.Monitor.On
System.PowerSource.Line
15:58:20: 1 MainThread: Document.ShowFrame()
15:58:20: 1 MainThread: Log.GetData()
15:58:20: 1 MainThread: TreeCtrl.OnItemCollapsingEvent(event=<wx.TreeEvent>)
15:58:20: 1 MainThread: Document.ShowFrame => None

Re: TaskMonitorPlus plugin - v0.0.3

Posted: Fri Sep 08, 2017 1:21 pm
by Boolean263
Neytrino-OnLine wrote:Still no events :(
Did you see topix's solution above? Try completely removing the original Task Monitor from your Autostart tree, not just disabling it, and see if that helps.

Re: TaskMonitorPlus plugin - v0.0.3

Posted: Fri Sep 08, 2017 3:33 pm
by Neytrino-OnLine
Boolean263, I did it...
Image
If you see my log, it shouldn't be there...

Re: TaskMonitorPlus plugin - v0.0.3

Posted: Fri Sep 08, 2017 3:46 pm
by Boolean263
Neytrino-OnLine wrote:Boolean263, I did it...
Image
If you see my log, it shouldn't be there...
Thank you for the updated screenshot. The last one you posted had it there but disabled, so I wanted to be sure.
Neytrino-OnLine wrote:Image
Unfortunately that means we're back to square one. I don't know what else could be interfering with TMP.

Re: TaskMonitorPlus plugin - v0.0.4

Posted: Fri Sep 08, 2017 4:06 pm
by Boolean263
I've released verson 0.0.4 based on feedback from kgschlosser. It's all under-the-hood fixes:
  • The title and window_class attributes are now correct if either one would be the empty string
  • Methods which require their window to exist throw an understandable exception
I still can't find why it would be failing for Neytrino-OnLine. It works for me, and it works for topix. Can more people please try it and let us know whether it works or not? If we can find the common ground, it'll be easier to resolve.

Re: TaskMonitorPlus plugin - v0.0.4

Posted: Fri Sep 08, 2017 5:27 pm
by topix
@Neytrino-OnLine: Not sure if it helps, but now that you have only TMP in your config tree, disable it and then re-enable it.

Re: TaskMonitorPlus plugin - v0.0.4

Posted: Fri Sep 08, 2017 6:50 pm
by Neytrino-OnLine
topix, if I disable and then enable it - EG crushes...

Re: TaskMonitorPlus plugin - v0.0.4

Posted: Fri Sep 08, 2017 6:56 pm
by topix
huh, any error messages? Run EG with the -debug parameter.

Other idea: Remove both plugins. Exit EG and start again. Add the plugin again. Success?
Maybe for a test use a clean/empty config tree with only TaskMonitorPlus added.

Re: TaskMonitorPlus plugin - v0.0.4

Posted: Fri Sep 08, 2017 11:16 pm
by kgschlosser
Ok I have a silly question. Down at the bottom of of the EventGhost Window. There is a little check box if it is checked, uncheck it. And let us know.