Controls innerhalb einer Dialogbox ....

  • Hallo Zusammen,

    ich bin mal wieder seit einigen Stunden am Knobel und komme einfach nicht weiter.
    Es geht um das auslesen von Text in einer Dialogbox, welche von einer fremden Anwendung
    geöffnet wird.

    UI Spy liefert für die Dialogbox keinen Namen und keine Automation ID:

    Identification
    ClassName: "#32770"
    ControlType: "ControlType.Pane"
    Culture: "(null)"
    AutomationId: ""
    LocalizedControlType: "Dialogfeld"
    Name: ""
    ProcessId: "5896 (dps)"
    RuntimeId: "42 3081396"
    IsPassword: "False"
    IsControlElement: "True"
    IsContentElement: "True"

    Textfeld innerhalb der Dialogbox:
    Identification
    ClassName: "Static"
    ControlType: "ControlType.Text"
    Culture: "(null)"
    AutomationId: "1117"
    LocalizedControlType: "Text"
    Name: "Programming Successfully Ended!!"
    ProcessId: "4808 (dps)"
    RuntimeId: "42 2099054"
    IsPassword: "False"
    IsControlElement: "True"
    IsContentElement: "False"

    [autoit]

    ;Wait for MsgBox
    $i = 0
    While $i = 0
    $hWindow = WinWaitActive("[Class:#32770]", "",5); Wait for success window
    If $hWindow = 0 Then
    If WinExists("DPS") Then ;check for error message
    $i = 1
    WinWaitActive("DPS")
    $sResult = ControlGetText("DPS", "", "[CLASS:Static; ID:65535]")
    FileWriteLine($hLogfile, 'DPS: ' & $sResult)
    WinClose("Development Programming System")
    Exit
    EndIf

    Else
    $i = 1
    ;$sTitle = Wingettitle("[Class:#32770]");check for success message
    ;msgbox(0,"",$sTitle)
    $sResult = ControlGetText("[Class:#32770]","","[CLASS:Static; ID:1117]")
    MsgBox(0,"Text",$sResult)
    $sResult = ControlGetText($hWindow,"","[CLASS:Static; ID:1117]")
    MsgBox(0,"Text",$sResult)

    FileWriteLine($hLogfile, 'DPS: ' & $sResult)
    ControlClick("Development Programming System - Programming1", "", "[CLASS:Button; ID:1]")
    EndIf
    WEnd

    [/autoit]

    Mein Problem ist, dass ich weder den Text auslesen kann, noch der ControlClick funktioniert !
    Ich bin mir relativ sicher, dass $hWindow auf die Dialogbox zeigt, da die Schleife beendet wird, soblad
    die Dialogbox erscheint.

    Bin mal gespannt, wo es diesmal klemmt.

    Gruß
    Marcel