First try

2006-01-13
2013-05-28
  • Franz Steinhaeusler

    Hello,
    interesting application.

    After starting, there was a complaint about
    no module SendKeys.

    It would be helpful to mention it to install somewhere.
    So I fired up google and found it in:
    http://www.rutherfurd.net/python/sendkeys/#binaries

    with Pycrust, I tried your example.
    Here is the output:

        >>> app = application.Application()
        >>> app._start(ur"c:\windows\system32\notepad.exe")
        <application.Application object at 0x01F9CE30>
        >>> app.Notepad.MenuSelect("File->PageSetup")
        Traceback (most recent call last):
          File "<input>", line 1, in ?
          File "C:\Python24\Lib\site-packages\application.py", line 142, in __getattr__
            dlg, final = wait_for_function_success(
          File "C:\Python24\Lib\site-packages\application.py", line 169, in wait_for_function_success
            return func(*args, ** kwargs)
          File "C:\Python24\Lib\site-packages\application.py", line 111, in WalkDialogControlAttribs
            dialogWin = findbestmatch.find_best_control_match(attr_path[0], wins)
          File "C:\Python24\Lib\site-packages\findbestmatch.py", line 209, in find_best_control_match
            raise MatchError(items = name_control_map.keys(), tofind = search_text)
        MatchError: Could not find 'Notepad' in '[u'UnbenanntEditorDialog', u'UnbenanntEditor', 'Dialog']'
        >>>

     
    • Mark Mc Mahon

      Mark Mc Mahon - 2006-01-21

      Hi,

      Sorry I missed you message before - I didn't see this area.

      The problem is that you are on German windows so when Notepad starts up it doesn't have the title "Untitled - Nodepad" but "Unbenannt - Editor". So you would have to modify the script to say Editor.

      In the near future I would like to modify the script so that you can save information once and it will use that information to find the dialog. That will be easy enough for controls - but not so easy for dialogs (I need to think how to do this!)

      I will add a ticket (bug report) that I need to mention that for now the test_application.py only runs well on English.

       

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks