TJG,
I am trying to save a file, it is working fine. But if the file is not on the foreground while setting combo box directory, changing the value in the combo box by setLookIn() appear on the foreground window. I am using following functionality to save the file. def saveAsFile(fileName, path): while 1: # findWindow function returns a window class which contains all its childwindow and its components with handler id. saveaswindow = self.findWindow('Save As') saveaswindow._setLookIn(path) #save function save the file in specified path saveaswindow.save(False) def _setLookIn(self, path): try: #XXX set the directory in combo box win32gui.SendMessage(win32con.CB_DIR, 0, path) win32gui.SendMessage(win32con.WM_LBUTTONDOWN, 0, 0) win32gui.SendMessage(win32con.WM_LBUTTONUP, 0, 0) win32gui.SendMessage(win32con.WM_LBUTTONDOWN, 0, 0) win32gui.SendMessage(win32con.WM_LBUTTONUP, 0, 0) except : raise OpenSaveDialogError('Cannot set Look In path. %s is not a valid folder path.' % path) -----Original Message----- From: Tim Golden [mailto:[EMAIL PROTECTED] Sent: Thursday, June 12, 2008 1:22 PM Cc: python-list@python.org Subject: Re: How to set directory in save as combo box gopal mishra wrote: > In 'save as' dialog of window application, I am trying to set the path in > 'save in' combo box using python win32 programming. > How we can set the directory in the 'save in' combo box. There are several ways to display a "Save As" dialog. Can you post [a minimal version of] the code you're using so we can see what you're doing, please? TJG
-- http://mail.python.org/mailman/listinfo/python-list