How to write code to get focuse the application which is open from server

vithi vithi99 at
Mon Jan 15 19:53:18 CET 2007

I am sorry that was a typing error. I try like that
app.Print.OK.Click() but it was not working. The printer window was not
IdentifiedIs their any method I can use to achive the same goal. How
the window title was used as class name?. Could you please help me to
solve this problem.
this is the error meassage

Traceback (most recent call last):
  File "C:\Python24\", line 10, in -toplevel-
  File "c:\python24\pywinauto\pywinauto\", line 237, in
    ctrls = _resolve_control(
  File "c:\python24\pywinauto\pywinauto\", line 854, in
    ctrl = _get_ctrl(criteria)
  File "c:\python24\pywinauto\pywinauto\", line 622, in
    dialog = controls.WrapHandle(
  File "c:\python24\pywinauto\pywinauto\", line 62, in
    windows = find_windows(**kwargs)
  File "c:\python24\pywinauto\pywinauto\", line 177, in
    windows = findbestmatch.find_best_control_matches(
  File "c:\python24\pywinauto\pywinauto\", line 483, in
    raise MatchError(items = name_control_map.keys(), tofind =
MatchError: Could not find 'Print' in '['', u'Transparent Windows
Client0', u'Transparent Windows Client2', u'Transparent Windows
Client1', u'Print - \\\\Remote', u'Transparent Windows Client', u'Print
- \\\\RemoteTransparent Windows Client']'

This is the code
import sys
import time
import application
app = application.Application()
qi=app.window_(title_re = ".*ArcView.*")


Dennis Lee Bieber wrote:
> On 14 Jan 2007 21:11:35 -0800, "vithi" <vithi99 at> declaimed
> the following in comp.lang.python:
> >
> > my code goes like that
> 	"goes like"?  Don't type similarities from memory -- cut&paste the
> actual code (or, preferably, a stripped down version that you've
> actually run) that shows the behavior in question.
> > app=application.Application()
> > qi = app.window_(title_re = ".*arcMap.*")
> > qi.TypeKeys("%FP")
> > app,Print.OK.Click()
> >
> 	And what is that last line supposed to be doing. "app,anything" is
> two separate objects: an application object, and something called Print
> with an attribute called OK which itself has a method called Click
> 	I suspect, at a minimum, that last line is supposed to be
> app.Print.OK.Click()
>    ^	period, not

More information about the Python-list mailing list