[python-win32] WMI troubles!

Lincoln Yeoh lyeoh at pop.jaring.my
Sun Jan 24 15:31:56 CET 2010


Hi,

Coincidentally I'm using the hotkey code from Tim's url and it works 
quite well.

But I'm not sure which is better:

user32.GetMessageA or user32.GetMessageW (along with the 
corresponding user32.DispatchMessageA or user32.DispatchMessageW of course).

Regards,

Link.


At 04:31 AM 1/16/2010, Tim Golden wrote:
>On 15/01/2010 19:38, Alex Hall wrote:
>>I do not want a single script because, eventually, the plan is to have a
>>keystroke for core 1, a keystroke for core 2, a keystroke for percent of
>>ram used, a keystroke for hard disk space, and so on. While I could
>>write each function in its own script and put a hotkey on each one, it
>>seems easier and faster to just make one script and run it once,
>>avoiding the delay I always get when this script runs for the first time
>>from happening each time I press a hotkey.
>
>I've got slightly lost in this thread (not helped, I'm
>afraid Alex, by your habit of top-posting ;) ) but in
>an effort to be helpful, can I suggest the following.
>Instead of fiddling with pyHooks which are -- as Tim R
>points out -- somewhat dark and messy, consider adapting
>the following example instead:
>
>http://timgolden.me.uk/python/win32_how_do_i/catch_system_wide_hotkeys.html
>
>This uses a straightforward Windows message loop to
>provide to sort of global hotkeys I think you're after.
>You might, for example, change the handle_win_f3
>function to start a wmi instance (or use an existing
>one) and then produce the output you were after.
>
>TJG
>_______________________________________________
>python-win32 mailing list
>python-win32 at python.org
>http://mail.python.org/mailman/listinfo/python-win32




More information about the python-win32 mailing list