472,139 Members | 1,588 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,139 software developers and data experts.

Re: How to set directory in save as combo box

Couple of things, Gopal, which you might want to remember
when posting to mailing lists etc. One is that it's *much* better
(and more considerate) to post in plain text, not in HTML. (You
should be able to tell Outlook to use plain text). *Especially* when
posting code. And even *more* especially when posting Python
code where the layout is uber-important.

The other thing is that top-posting is not the norm in this group,
although it may be in others. The usual thing is to trim the email
you're replying to (or the newsgroup post or GGroup entry) so
that only the relevant text remains, and then put your replies
beneath or interspersed depending on what makes sense.

Now to the code itself:
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.
[... snip code which finds a "Save As" window and sends it mouse messages ...]

I'm honestly not sure what you're trying to achieve here. I assumed that
*your* application was initiating the "Save As..." dialog. But this code looks
as though you're trying to automate some *other* application's dialog box.
Can you explain better what's going on?

Trying to poke values into other application's windows is fragile at best,
but if that's really what you want to do, have a look at a couple of projects
which specialise in that kind of thing:

+ WATSUP: http://www.tizmoi.net/watsup/intro.html
+ PyWinAuto: http://pywinauto.openqa.org/

Trying to poke values into *your own* application's windows is entirely
suspect: there's almost certainly a better way of doing it.

Jun 27 '08 #1
0 1088

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Jim Stacey | last post: by
3 posts views Thread by Koliber (js) | last post: by
reply views Thread by Tim Golden | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.