[python-win32] CreateDesktop() and displaying a window on it

2017-04-06 Thread k
Hey all, I'm trying to get system modal functionality like the UAC dialog. According to http://developex.com/blog/system-modal-back/ the thing to do is to create and switch to a new desktop. Therefore, I'm doing: hDeskOld=win32service.GetThreadDesktop(win32api.GetCurrentThreadId()) hDesk=win

[python-win32] force outlook ui update

2008-10-25 Thread Christian K.
Hi, I apologize for asking a not specifically python related question but I have no idea where to ask (pointers welcome, too). I noticed that after having written e.g. to the PR_SUBJECT of a mapi IMessage, e.g.: msg = self.msgstore._OpenEntry(self.id, None, mapi.MAPI_BEST_ACCESS) msg.SetPro

Re: [python-win32] force outlook ui update

2008-10-29 Thread Christan K .
Tim Roberts probo.com> writes: > > Christian K. wrote: > > > the subject field in the inbox list changes immedately but the subject > > line of the message itself (either shown in the embedded panel or in > > its own frame) does not. After a couple of other a

Re: [python-win32] force outlook ui update

2008-10-30 Thread Christan K .
Tim Roberts probo.com> writes: > > Christan K. wrote: > > Tim Roberts probo.com> writes: > > > >> Christian K. wrote: > >> > >>> the subject field in the inbox list changes immedately but the subject > >>> line of the

Re: [python-win32] how to call the dll in python

2008-11-07 Thread Christian K.
ysystudio wrote: > I have a windows dll1.dll with a export function: > > int f1(char filename,char **buf,int *bufLen) > { > int len; > //got the length of file anyway,such as 100 > len = 100;//len = getLen(filename); > *buf = (char*)calloc(100); > *bufLen = len; > return 0; > } > > then how can

[python-win32] SOLVED: force outlook ui update

2008-12-14 Thread Christian K .
Hi, a couple of weeks ago I asked how to refresh the outlook view after having modified a mail's properties directly using the extended MAPI. At least for the subject of the mail there is an easy workaround: mailitem.Subject = mailitem.Subject will trigger a refresh of all views of the mailitem.

[python-win32] mapi - writing to PR_BODY

2009-02-08 Thread Christian K.
Hi, according to http://msdn.microsoft.com/en-us/library/cc839695.aspx writing to the PR_BODY property of a mapi message should be done more or less like the following: def TextToStream(mapi_object, text): prop_id = PR_BODY_A stream = mapi_object.OpenProperty(prop_id,

Re: [python-win32] mapi - writing to PR_BODY

2009-02-12 Thread Christian K.
Mark Hammond schrieb: On 8/02/2009 7:06 PM, Christian K. wrote: write should return the number of bytes written but it returns None here. It appears Roger fixed this on 2007/08/07 and the fix was in builds 211 and 212. I suppose I am using a recent build - where can I find the version

Re: [python-win32] mapi - writing to PR_BODY

2009-02-13 Thread Christian K.
Mark Hammond wrote: > On 13/02/2009 2:35 AM, Christian K. wrote: >> Mark Hammond wrote: >> And I had situations, where write indeed did return the number of bytes >> written, again without any change on the body. My understanding of mapi >> is very basic but this s

Re: [python-win32] mapi - writing to PR_BODY

2009-02-13 Thread Christian K.
Mark Hammond schrieb: On 13/02/2009 2:35 AM, Christian K. wrote: Mark Hammond schrieb: tuations, where write indeed did return the number of bytes written, again without any change on the body. My understanding of mapi is very basic but this seems to have to do with the access method to the

Re: [python-win32] mapi - writing to PR_BODY

2009-02-15 Thread Christian K.
Mark Hammond schrieb: On 14/02/2009 12:56 AM, Christian K. wrote: So write seems to work as expected (reporting the right number of bytes) but I have no clue *where* the data is written to. The mail body stays completely unaffected. I guess step 1 would be to see if you can re-read it - ie

Re: [python-win32] mapi - writing to PR_BODY

2009-02-15 Thread Christian K.
Christian K. wrote: > def TextToStream(mapi_object, text): > prop_id = PR_BODY_A > stream = mapi_object.OpenProperty(prop_id, > pythoncom.IID_IStream, > 0, mapi.MAPI_MODIFY) > print stream.S

Re: [python-win32] ANN: PyGUI 2.0

2009-04-16 Thread Christian K .
Hi, I get the following traceback when running any demo. This is on XP using PyGUI 2.0.1 with pythonxy 2.1.12, pywin32 2.13 Christian $ python nag_box.py File "nag_box.py", line 1, in from GUI import ModalDialog, Label, Button, Task, application File "c:\pythonxy\python\Lib\site-pac

Re: [python-win32] ANN: PyGUI 2.0.2

2009-04-18 Thread Christian K.
Greg Ewing schrieb: PyGUI 2.0.2 is available: http://www.cosc.canterbury.ac.nz/greg.ewing/python_gui/ Fixes problem on Windows causing "This file should not be imported" error. Now I get this traceback: $ python main.py File "main.py", line 9, in from sheetapp import MatSheetApp

Re: [python-win32] ANN: PyGUI 2.0.2

2009-04-20 Thread Christian K .
Greg Ewing canterbury.ac.nz> writes: > > Christian K. wrote: > > > "c:\pythonxy\python\Lib\site-packages\GUI\Win32\ScrollableViews.py", > > line 31, in __init__ > >GScrollableView.__init__(self, _win = win) > > win32ui.error: The object ha

Re: [python-win32] ANN: PyGUI 2.0.4

2009-04-21 Thread Christian K .
Hi Greg, Greg Ewing canterbury.ac.nz> writes: > on Windows, although I can't be sure it will fix all > the Windows problems people are having, because I > haven't been able to reproduce some of them. > > What is PyGUI? > -- > > PyGUI is a cross-platform GUI toolkit designed to be

[python-win32] py2exe and com server again

2009-04-26 Thread Christian K.
Hi, despite all the information on this list and on the wiki I can't get my com server up from the py2exe created dll. As it is a outlook com server I followed the approach taken in the spambayes project, i.e. in the addin I have: bValidateGencache = not hasattr(sys, "frozen") gencache.Ensur

[python-win32] COM sending and receiveing events

2009-06-21 Thread Christian K .
Hi, I apologize for my ignorance about COM programming in advance. I would like to be pointed to an example of how I could send a message from a subthread of a COM server back to the main thread. Being an outlook addin, the COM server is already reacting to a couple of Outlook generated events. No

[python-win32] How to add Pylint for the Komodo IDE.

2009-08-20 Thread k c
Can you please help me, to add pylint for Komodo IDE. for analyze the source code. ___ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32

[python-win32] 2010 com addin and IRibbonExtensibilty

2010-12-05 Thread Christian K.
Hi, has anybody experiencs in writing Outlook com addins using the IRibbonExtensibilty mechanism? I would like to make use of the ui features provided by office 2010. Currently I am creating office toolbars as demonstrated in the win32com.demos and all toolbars go to the "Addins" tab. Thank

Re: [python-win32] 2010 com addin and IRibbonExtensibilty

2010-12-07 Thread Christian K.
Am 06.12.10 05:42, schrieb robert2682: Christian K. wrote: Hi, has anybody experiencs in writing Outlook com addins using the IRibbonExtensibilty mechanism? I would like to make use of the ui features provided by office 2010. Currently I am creating office toolbars as demonstrated in the

Re: [python-win32] 2010 com addin and IRibbonExtensibilty

2010-12-08 Thread Christian K.
Hi Robert, Am 09.12.10 00:05, schrieb robert2682: 2) I'd appreciate it if you'll let me know whether the Tag attribute in the callback can be read. This is the problem I mentioned in my initial response. Just let me know the contents of the second message box after clicking the button in Offic

[python-win32] addin fails to load the first time after login

2011-11-23 Thread Christian K.
Hi, I am observing a strange behaviour of two python com-servers/addins, one of them is called from Excel VBA the other one is an Outlook (both from Office 2003) addin. Both of them work if I register them and start using Outlook or Excel thereafter. However when I log out and login the next time

[python-win32] how to create a instance of PyIMAPISession by hand

2013-05-08 Thread Christian K .
The following code has been suggested to me to get a handle to Outlook's mapi session. from win32com.client import Dispatch from win32com.mapi import mapi app = Dispatch('Outlook.Application') app.GetNamespace('MAPI').Session.MAPIOBJECT The MAPIOBJECT would then have to be cast to a IMAPISessio

[python-win32] debugging outlook addin

2013-05-19 Thread Christian K.
I need to debug an outlook addin written in python which crashes outlook in a reproducible manner. How could I do that? Is it possible to have the addin loaded from within a pdb session? The addin uses the mapi msgstore wrappers from the spambayes project. The crash occurs while the addin is s

[python-win32] wx.Frame with windows parent

2013-06-04 Thread Christian K.
Hi, I asked this some time ago on the wxpython list and still have no solution: I am trying to make a wx.Dialog float on a non-wxpython parent. I get the HWND of the window, call wx.Window_FromHWND(None, HWND) and open the dialog with that parent and FLOAT_ON_PARENT style. This works very well

[python-win32] python3 and extended mapi

2014-06-09 Thread Christian K .
Hi, I was very pleased to see that retrieving properties of a MAPI object yields either a or type depending on whether the _A or _W property was queried and entryids are always returned as bytes types. Very nice! This makes a lot of bin2str2bin conversion and encoding/decoding code obsolete. Nev

Re: [python-win32] python3 and extended mapi

2014-06-09 Thread Christian K .
Dell.com> writes: > > > On Jun 9, 2014, at 9:07 AM, Christian K. hoc.net> wrote: > > > Hi, > > > > I was very pleased to see that retrieving properties of a MAPI object yields > > either a or type depending on whether the _A or _W property

Re: [python-win32] python3 and extended mapi

2014-06-09 Thread Christian K.
Am 09.06.14 16:00, schrieb paul_kon...@dell.com: On Jun 9, 2014, at 2:53 PM, Christian K. wrote: Dell.com> writes: On Jun 9, 2014, at 9:07 AM, Christian K. hoc.net> wrote: Hi, I was very pleased to see that retrieving properties of a MAPI object yields either a or type dep

Re: [python-win32] python3 and extended mapi

2014-06-10 Thread Christian K .
Dell.com> writes: > > > On Jun 9, 2014, at 9:40 PM, Christian K. hoc.net> wrote: > > > Am 09.06.14 16:00, schrieb Paul_Koning Dell.com: > >> > >> On Jun 9, 2014, at 2:53 PM, Christian K. hoc.net> wrote: > >> > >>> Dell.

Re: [python-win32] python3 and extended mapi

2014-06-10 Thread Christian K .
Mark Hammond gmail.com> writes: > > It would be great if you could open a bug at sourceforge... Done. ___ python-win32 mailing list python-win32@python.org https://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] python3 and extended mapi

2014-06-10 Thread Christian K .
Christian K. hoc.net> writes: > > Dell.com> writes: > > I would only want/expect to see “bytes” types when the values in question > are binary data streams, or > > unknown format. But anytime we’re dealing with text strings, the Python 3 > approach is that

Re: [python-win32] python3 and extended mapi

2014-06-14 Thread Christian K.
Dell.com> writes: I would only want/expect to see “bytes” types when the values in question are binary data streams, or unknown format. But anytime we’re dealing with text strings, the Python 3 approach is that the Python code sees “str” type, and questions of encoding have been handled

[python-win32] question about DynamicPolicy.py

2007-02-02 Thread k f
Greetings, In Chapter 12 of "Python Programming on Win32" there is a sample code demonstrating how to expose a python module in a COM server. A function named FixArgs is used in the example to convert Unicode string to ascii string. I'm guessing this is no longer necessary for the recent versio

[python-win32] com events while running wx main loop

2007-04-17 Thread Christian K.
Hi, I'm trying to recieve com events in a wxpython application. I modified an example posted here by Thomas Heller some time ago. It seems that the events are not delivered. Am I doing something wrong or is this just a limitation of com/wxPython? Thanks for any hint, Christian ___

Re: [python-win32] com events while running wx main loop

2007-04-17 Thread Christian K.
sorry. I forgot the attachment. Christian import unittest import comtypes.client import wx class EventHandler(object): """Instances are called when the COM object fires events.""" def __init__(self, view, name): self.view = view self.name = name def __call__(self,

Re: [python-win32] com events while running wx main loop

2007-04-18 Thread Christian K.
Thomas Heller wrote: > Christian K. schrieb: >> sorry. I forgot the attachment. >> >> Christian >> >> >> >> >> >> import unittest >> import comtypes.client >&g

Re: [python-win32] com events while running wx main loop

2007-04-20 Thread Christian K.
Thomas Heller wrote: > Christian K. schrieb: >> Now I installed comtypes from svn and get this error running your new >> example: >> >> Traceback (most recent call last): >>File "C:\Dokumente und Einstellungen\ck\Desktop\x.py", line 64, in ? >

Re: [python-win32] com events while running wx main loop

2007-04-20 Thread Christian K
Thomas Heller wrote: > Christian K. schrieb: >>> Second, if you are running the exact sample that I posted then it should >>> work >>> for InternetExplorer, and with slight changes also for Outlook. At least >>> it worked for me. >> Well, here it

[python-win32] how to create a valid Sink

2007-05-08 Thread Christian K.
Hi, I'd like to ask for help on how to create a valid event Sink which I can pass to the Advise() method of a message stores table. Any class I made up so far gives the same error: File "", line 333, in notify TypeError: The Python instance can not be converted to a COM object So what attribu

Re: [python-win32] how to create a valid Sink

2007-05-09 Thread Christian K.
Mark Hammond wrote: >> I'd like to ask for help on how to create a valid event Sink >> which I can >> pass to the Advise() method of a message stores table. > > This might be tricky unless pywin32 already has support for the specific > interface you need. I want to receive 'new mail' notification

Re: [python-win32] how to create a valid Sink

2007-05-09 Thread Christian K.
Mark Hammond wrote: >> Forgive my ignorance but those are my first steps with com. Does that >> mean I should create and register a COM server? > > You should create one - you probably don't need to register it. > >> Basically I'm trying to reimplement the following code in python: >> >> http://w

[python-win32] AD group membership - recursive query

2007-06-26 Thread M K
Hello there, First let me say that I'm new to both Python and LDAP programming in general, so you can safely assume that I'm coding somewhat blindly. What I'm trying to do is build a program against a Microsoft Active Directory that will find all group memberships for the current user. Because w

[python-win32] meaning of bin string representation of PR_ENTRYID

2007-06-28 Thread Christian K.
Hi, can anybody tell me the meaning of the binary string representation of a PR_ENTRYID, as obtained by calling GetProps() on a mail item? I get e.g. the following IDs: 3C437E32AFD11C49ABB743DDE9EDFE6BE4652000 3C437E32AFD11C49ABB743DDE9EDFE6B24602000 3C437E32AFD11C49ABB74

Re: [python-win32] meaning of bin string representation of PR_ENTRYID

2007-06-28 Thread Christian K.
Mark Hammond wrote: >> can anybody tell me the meaning of the binary string >> representation of a >> PR_ENTRYID, as obtained by calling GetProps() on a mail item? > > Its a binary value that is unique for the item (but only unique within the > store - PR_STORE_ENTRYID will tell you the store ID)

Re: [python-win32] meaning of bin string representation ofPR_ENTRYID

2007-06-28 Thread Christian K.
Mark Hammond wrote: >> > The values above already *are* a hexadecimal value - you >> > can't safely change any part of it. >> >> I do not want to change it. I hoped that the extracted part might be >> enough to identify a message within one message store. > > That's what I meant - I should have sa

[python-win32] how to terminate a extended mapi session

2007-08-24 Thread Christian K.
Hi, what must I take care of by myself when I want to terminate a program which communicates with Outlook through the extended mapi interface, i.e. in addition to session.Logoff and mapi.MAPIUnitialize? Currently I get the following errors upon prorgam termination and, what is more important, Outl

[python-win32] using wxPython from Outlook addin

2007-10-08 Thread Christian K.
Hi, since my knowlegde about windows gui programming is not existent I'd prefer to do the gui part of a Outlook addin using wxPython. Is that possible at all and if yes, at which point can I start the wxPython main loop? Basically the addin does similar things as spambayes. It listens to button an

[python-win32] writin Outlook's custom action rules in python?

2007-10-15 Thread Christian K.
Hi, is there any chance that one could write a custom action rule (CAR, see http://support.microsoft.com/?kbid=151690) for Outlook in python? Christian ___ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python

[python-win32] gui examples

2007-10-15 Thread Christian K.
Hi, could somebody point me please to examples of gui programming using pywin32? Thanks, Christian ___ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] gui examples

2007-10-16 Thread Christian K.
Ludovic Reenaers wrote: > Hi, > you should download WxPython there is a pretty nice documentation with very detailed samples. > cheers, I know, thanks. wxPython is usually my first choice, however this time I just need some simple stuff, e.g. simple dialogs, message boxes and I don't want to have

Re: [python-win32] gui examples

2007-10-16 Thread Christian K.
Tim Golden timgolden.me.uk> writes: > > Christian K. wrote: > > Ludovic Reenaers wrote: > >> Hi, > >> you should download WxPython there is a pretty nice documentation with very > > detailed samples. > >> cheers, > > > > I know, than

Re: [python-win32] gui examples

2007-10-16 Thread Christian K.
Thanks everybody for all the pointers. I've enough to play with now. Christian ___ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32

[python-win32] unable to receive button click notifications

2007-10-16 Thread Christian K.
Hi, I'm just trying the pywin gui examples and I'm wondering why I won't receive any BN_CLICKED notifications in the code attached. Can anyone help? Christian from pywin.mfc import dialog, window import win32ui import win32con import win32api def MakeDlgTemplate(): style = (win32con.DS_M

[python-win32] FTP Task Schedule in Python

2008-03-24 Thread K-Factory
Hi Forum, I need to automate a scheduled weekly task i.e. downloading a file from FTP. This is to be done on WINDOWS but I am unable to make any further development on this as I am stuck with the python scheduler itself. Can somebody help me with this, I just need a skeleton of code further thing

[python-win32] catching the "close" event

2009-02-12 Thread Pollack, Steven K
catch associated with the "close" button (the little ole red x) that I can trap and or cancel before the application dies. I want to force a file save first. Also, it would be nice to know (for a newbie) how to search the archive to see if such a thing has already been asked. Steven K

[python-win32] Jonathan K Shelley is out of the office.

2009-07-22 Thread Jonathan K Shelley
I will be out of the office starting 07/21/2009 and will not return until 07/27/2009. I will respond to your message when I return. For assistance please contact Blaik Beattie (blaik.beat...@inl.gov)___ python-win32 mailing list python-win32@python.or

[python-win32] Need data type identifiers

2012-07-21 Thread Fox, Michael K
We are having occasional difficulties when we need to pass an argument in-and-out of a COM method that we are calling in Python. There is some magic in makepy that normally handles this for us but occasionally it fails because it somehow reads the typelib incorrectly and misunderstands the data

Re: [python-win32] Need data type identifiers

2012-07-30 Thread Fox, Michael K
Thanks Mark. That's exactly what we needed. Mike Fox > All the other comments in this thread are correct, but one other thing > you can do in recent pywin32 builds is to use win32com.client.VARIANT to > override how a value is passed - search for 'win32com.client.VARIANT' in > pywin32.c