How to set directory in save as combo box
Gabriel Genellina
gagsl-py2 at yahoo.com.ar
Fri Jun 13 03:26:32 EDT 2008
En Fri, 13 Jun 2008 01:55:58 -0300, gopal mishra <gopalm at infotechsw.com>
escribió:
> 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.
>
>
> def saveAsFile(fileName, path):
> [...]
> 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)
Is it your own application? Or are you trying to alter the SaveAs dialog
on another application?
If it is yours, sending keyboard messages is crazy. Use the InitialDir
argument to win32gui.GetSaveFileNameW
--
Gabriel Genellina
More information about the Python-list
mailing list