From xieyie at qq.com Tue Aug 6 14:03:17 2013 From: xieyie at qq.com (=?gb18030?B?0uPOtsnustg=?=) Date: Tue, 6 Aug 2013 20:03:17 +0800 Subject: [python-win32] =?gb18030?b?16q3oqO6IEFsbG93aW5nIHNlcnZpY2UgdG8g?= =?gb18030?q?interact_with_desktop_win2008?= Message-ID: How do I allowing service to interact with desktop in session1 of win2008. but not session0. -------------- next part -------------- An HTML attachment was scrubbed... URL: From timr at probo.com Wed Aug 7 05:40:18 2013 From: timr at probo.com (Tim Roberts) Date: Tue, 6 Aug 2013 20:40:18 -0700 Subject: [python-win32] =?gb18030?b?16q3oqO6IEFsbG93aW5nIHNlcnZpY2UgdG8g?= =?gb18030?q?interact_with_desktop_win2008?= In-Reply-To: References: Message-ID: On Aug 6, 2013, at 5:03 AM, ???? > wrote: How do I allowing service to interact with desktop in session1 of win2008. but not session0. If you go into the Services control panel applet and check the properties of your service, you can change it to run as the "Local System" user and enable "Allow service to interact with desktop". -- Tim Roberts, timr at probo.com Providenza & Boekelheide, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From A.J.Miller at bcs.org.uk Wed Aug 7 23:08:30 2013 From: A.J.Miller at bcs.org.uk (Andrew Miller) Date: Wed, 7 Aug 2013 22:08:30 +0100 Subject: [python-win32] Pywin32 and Uniscribe Message-ID: Is it possible to access the Uniscribe API using pywin32? Thanks, Andrew -------------- next part -------------- An HTML attachment was scrubbed... URL: From skippy.hammond at gmail.com Thu Aug 8 02:13:55 2013 From: skippy.hammond at gmail.com (Mark Hammond) Date: Thu, 08 Aug 2013 10:13:55 +1000 Subject: [python-win32] WMPlayer.OCX COM object: player window is not opened In-Reply-To: <1375003386692-5026288.post@n6.nabble.com> References: <1375003386692-5026288.post@n6.nabble.com> Message-ID: <5202E2C3.3030801@gmail.com> On 28/07/2013 7:23 PM, lambda wrote: > I'm trying to instantiate and use a Windows Media Player COM object. I can do > that and all seems fine, but the player window is not opened. > > Here's my code: The code didn't come through, but can be seen on nabble. Unfortunately, you are dealing with an OCX, so you need to host it in an OCS container to see any such UI. Pythonwin has support for this meaning you could have Pythonwin show the UI (see the pythonwin/pywin/demos directory) but it's extremely difficult to have that work via vanilla python. Mark > > I get the sound from this video, but no video window is shown. And in the > process list I don't find a wmplayer.exe process, just a wmpnetwk.exe > process (whereby I'm not sure if this process is related to my COM object). > > I played around a bit and found that > > actually opens a WMPlayer window; but that player can't be controlled by COM > commands; and similar are ineffective. > > Maybe I'm just overlooking a silly detail, but I'm stuck on this - any help > is appreciated! > > > > > -- > View this message in context: http://python.6.x6.nabble.com/WMPlayer-OCX-COM-object-player-window-is-not-opened-tp5026288.html > Sent from the Python - python-win32 mailing list archive at Nabble.com. > _______________________________________________ > python-win32 mailing list > python-win32 at python.org > http://mail.python.org/mailman/listinfo/python-win32 > From Kelly.Kranabetter at tolko.com Fri Aug 23 18:46:48 2013 From: Kelly.Kranabetter at tolko.com (Kelly Kranabetter) Date: Fri, 23 Aug 2013 16:46:48 +0000 Subject: [python-win32] Negative HWND values from win32gui.EnumChildWindows Message-ID: <433FE7ED3696FE48B31440478E9E4E9D4D7F23D4@VOEx10Mbx2.internal.tolko.com> I am occasionally getting back negative HWND values from EnumChildWindows. They appear to round trip properly, for example win32gui.GetClassName(-1901131990) appears to function properly. Not exactly a bug but is somewhat unexpected. I had grabbed this code from the net somewhere to get the currently focused window which returns HWND as an unsigned long: class GUITHREADINFO(ctypes.Structure): _fields_ = [ ("cbSize", ctypes.c_ulong), ("flags", ctypes.c_ulong), ("hwndActive", ctypes.c_ulong), ("hwndFocus", ctypes.c_ulong), ("hwndCapture", ctypes.c_ulong), ("hwndMenuOwner", ctypes.c_ulong), ("hwndMoveSize", ctypes.c_ulong), ("hwndCaret", ctypes.c_ulong), ("rcCaret", RECT) ] def getFocusedWindow(): guiThreadInfo = GUITHREADINFO(cbSize=ctypes.sizeof(GUITHREADINFO)) user32.GetGUIThreadInfo(0, ctypes.byref(guiThreadInfo)) return guiThreadInfo.hwndFocus My code would fail occasionally and I'd wonder why but never got into debugging it until one day it was failing constantly. After much head scratching the simple fix for me was to change the focus-finding-code to use ctypes.c_long so the result is not unsigned from both HWND sources. Not sure it is worth trying to fix in Pythonwin but figured I should post about it. This is on pywin32 build 217 on Python 2.7.2, Windows 7 32bit. Kelly Kranabetter Programmer/Support Analyst Tolko Industries (250)398-3980 -------------- next part -------------- An HTML attachment was scrubbed... URL: From timr at probo.com Mon Aug 26 19:43:27 2013 From: timr at probo.com (Tim Roberts) Date: Mon, 26 Aug 2013 10:43:27 -0700 Subject: [python-win32] Negative HWND values from win32gui.EnumChildWindows In-Reply-To: <433FE7ED3696FE48B31440478E9E4E9D4D7F23D4@VOEx10Mbx2.internal.tolko.com> References: <433FE7ED3696FE48B31440478E9E4E9D4D7F23D4@VOEx10Mbx2.internal.tolko.com> Message-ID: <521B93BF.5070908@probo.com> Kelly Kranabetter wrote: > > I am occasionally getting back negative HWND values from > EnumChildWindows. They appear to round trip properly, for example > win32gui.GetClassName(-1901131990) appears to function properly. Not > exactly a bug but is somewhat unexpected. > > > > I had grabbed this code from the net somewhere to get the currently > focused window which returns HWND as an unsigned long: > > ... > > My code would fail occasionally and I?d wonder why but never got into > debugging it until one day it was failing constantly. After much head > scratching the simple fix for me was to change the focus-finding-code > to use ctypes.c_long so the result is not unsigned from both HWND sources. > How does this cause a failure? c_long and c_ulong are both 32-bit quantities. It shouldn't cause a problem. -- Tim Roberts, timr at probo.com Providenza & Boekelheide, Inc.