Re: [python-win32] Why the strange frozen dance in win32com/__init__.py?

2007-10-11 Thread Mark Hammond
Note that nothing ever writes this stuff to the registry, so it is really old, dead code that can be removed. By all means, upload a tested patch to sourceforge and I'd be happy to look at it. Cheers, Mark > -Original Message- > From: [EMAIL PROTECTED] [mailto:python-win32- > [EMAIL PRO

Re: [python-win32] lock workstation

2007-10-11 Thread Tim Roberts
Tim Golden wrote: > Tim Roberts wrote: > >> The "usual" way to determine whether the desktop has been locked is to >> call OpenDesktop on the desktop called "default", and then try to use >> SwitchDesktop to switch to it. If the SwitchDesktop fails, then the >> workstation is locked. There's a

[python-win32] win32evtlogutil.SafeFormatMessage shortcomings

2007-10-11 Thread Eric Davis
Running pywin32 version 210. Python 2.5 I have some events that don't get formatted correctly, basically ones that contain messages from winerror and some events in the security logs. System Log Error [273] ID:7000 Service Control Manager Type: ERROR Time: 10/11/2007 05:13:18 The Network L

Re: [python-win32] lock workstation

2007-10-11 Thread Tim Golden
Tim Roberts wrote: > The "usual" way to determine whether the desktop has been locked is to > call OpenDesktop on the desktop called "default", and then try to use > SwitchDesktop to switch to it. If the SwitchDesktop fails, then the > workstation is locked. There's an example in Delphi here: >

Re: [python-win32] lock workstation

2007-10-11 Thread Tim Roberts
kNish wrote: > >Need : To track time when a workstation is locked and when > it is unlocked. Store this time. >My approach : 1st Option >Trap the key "ctrl+alt+del" or "windows+l". trigger a > procedure to save the time in and time out into a database. You ca

Re: [python-win32] lock workstation

2007-10-11 Thread Steven James
Never tried it, but you might want to see if "WTSRegisterSessionNotification" [ http://msdn2.microsoft.com/en-us/library/aa383841.aspx] works in the python win32 API. You can register your window to receive notification automatically when a user logs in, logs out, locks the machine, unlocks, etc.

[python-win32] lock workstation

2007-10-11 Thread kNish
Hi, Need : To track time when a workstation is locked and when it is unlocked. Store this time. My approach : 1st Option Trap the key "ctrl+alt+del" or "windows+l". trigger a procedure to save the time in and time out into a database.

Re: [python-win32] Selecting OK button in dialog

2007-10-11 Thread niki
mjohnson wrote: > I enumerate through the windows until I find the one I want, then using > I click the OK button. > > If I watch the execution on the screen I can see the OK button depressed > then released, but nothing happens. The spooky part is that if I then > move the mouse over the dial

[python-win32] Selecting OK button in dialog

2007-10-11 Thread mjohnson
I know this has been discussed elsewhere, maybe even on this board. But I am getting spooky things happening, can anyone shed any light please? I enumerate through the windows until I find the one I want, then using childWindows = [] win32gui.EnumChildWindows(window[0], windowEnumerationHandl

[python-win32] Why the strange frozen dance in win32com/__init__.py?

2007-10-11 Thread quest
(My appologies if this has been discussed earlier; my Google-fu may be weak.) pywin32's win32com/__init__.py does this (slightly compacted for brevity): def SetupEnvironment(): try: keyName = "SOFTWARE\\Python\\PythonCore\\%s\\PythonPath\\win32com" % sys.winver key =