Namen automatisch eintragen -> Button „OK“ reagiert nicht.

  • Ich versuche Namen automatisch eintragen -> Namen in das Feld eintragen und mit dem OK-Button bestätigen. Nur Button „OK“ reagiert nicht. Buttons „Abbrechen“ und „Hilfe“ reagieren.
    Wenn ich aber manuell die Namen eintrage. Button „OK“ reagiert.
    Was mache ich falsch?

    [autoit]


    ControlClick("Patientenauswahl", "","[CLASS:Window1Button; INSTANCE:5]", "", 1)
    WinWaitActive("[CLASS:Window2]", "", 120)
    ControlSetText("[CLASS:Window2]", "", "[CLASS:Window2TextBox; INSTANCE:44]","Schmidt"); es funktioniert
    WinWaitActive("[CLASS:Window2]", "", 120)
    ControlSetText("[CLASS:Window2]", "", "[CLASS:Window2TextBox; INSTANCE:43]","Rolf"); es funktioniert auch
    WinWaitActive("[CLASS:Window2]", "", 120)
    ControlCommand("[CLASS:Window2]", "", "[CLASS:Window2OptionButton; INSTANCE:2]", "Check", ""); es funktioniert auch
    WinWaitActive("[CLASS:Window2]", "", 120)
    ControlClick("[CLASS:Window2]", "", "[CLASS:Window2CommandButton; INSTANCE:2]", "", 1) ; keine Reaktion

    [/autoit]

    Einmal editiert, zuletzt von oxi (30. Mai 2011 um 13:13)

  • Nabend!

    Ich denke das es daran lag das du nicht angegeben hasst mit welcher Taste du den Klick ausführen willst.

    Versuch mal das hier:

    [autoit]

    ControlClick("Patientenauswahl", "","[CLASS:Window1Button; INSTANCE:5]", "", 1)
    WinWaitActive("[CLASS:Window2]", "", 120)
    ControlSetText("[CLASS:Window2]", "", "[CLASS:Window2TextBox; INSTANCE:44]","Schmidt"); es funktioniert
    WinWaitActive("[CLASS:Window2]", "", 120)
    ControlSetText("[CLASS:Window2]", "", "[CLASS:Window2TextBox; INSTANCE:43]","Rolf"); es funktioniert auch
    WinWaitActive("[CLASS:Window2]", "", 120)
    ControlCommand("[CLASS:Window2]", "", "[CLASS:Window2OptionButton; INSTANCE:2]", "Check", ""); es funktioniert auch
    WinWaitActive("[CLASS:Window2]", "", 120)
    ControlClick("[CLASS:Window2]", "", "[CLASS:Window2CommandButton; INSTANCE:2]", "left", 1) ; keine Reaktion

    [/autoit]
  • Ich habe es ausprobiert, aber ohne Erfolg. Und ausserdem in der Hilfe steht, dass "" == "left" .

  • Wenn der Button als nächstes in Reichweite der letzten Eingabe liegt, versuch mal das hier:

    [autoit]


    ControlClick("Patientenauswahl", "","[CLASS:Window1Button; INSTANCE:5]", "", 1)
    WinWaitActive("[CLASS:Window2]", "", 120)
    ControlSetText("[CLASS:Window2]", "", "[CLASS:Window2TextBox; INSTANCE:44]","Schmidt"); es funktioniert
    WinWaitActive("[CLASS:Window2]", "", 120)
    ControlSetText("[CLASS:Window2]", "", "[CLASS:Window2TextBox; INSTANCE:43]","Rolf"); es funktioniert auch
    WinWaitActive("[CLASS:Window2]", "", 120)
    ControlCommand("[CLASS:Window2]", "", "[CLASS:Window2OptionButton; INSTANCE:2]", "Check", ""); es funktioniert auch
    WinWaitActive("[CLASS:Window2]", "", 120)
    ; ControlClick("[CLASS:Window2]", "", "[CLASS:Window2CommandButton; INSTANCE:2]", "left", 1) ; keine Reaktion
    send("{TAB}")
    send("{ENTER}")

    [/autoit]

    Grüsse!