Problem mit ControlClick

  • Hallo, habe ein relativ doofes Problem mit ControlClick... kenne mich mit dem command nicht wirklich aus also erstmal zu meinem Problem. Ich habe ein Programm mit einem Fenster indem ich ControlClicks ausführen möchte. Dieses klappt auch soweit ganz gut. Jedoch ändern sich nach neustart des Programmes die Control ID's. Gibt es irgentwie eine andere möglichkeit als die ID's zu benutzen ? z.b. einen Tab oder einen Button per "Namen" anzuklicken ?

    Hier sind die Angaben die das Window Info Tool zu dem ersten Tab, den ich anklicken will, liefert:

    Spoiler anzeigen

    Class TPageControl
    Instance 1
    ClassnameNN TPageControl1
    Advanced (Class) [CLASS:TPageControl; INSTANCE:1]
    ID 3408804
    Text
    Position 0, 0
    Size 505,249
    ControlClickCoords 43,7
    ....

    danke

    Einmal editiert, zuletzt von SiLenCa (7. März 2009 um 19:56)

  • Wie das verändert sich alles? 8|

    Gibt viele Wege sowas anzusteuern:

    ID - The internal control ID. The Control ID is the internal numeric identifier that windows gives to each control. It is generally the best method of identifying controls. In addition to the AutoIt Window Info Tool, other applications such as screenreaders for the blind and Microsoft tools/APIs may allow you to get this Control ID
    TEXT - The text on a control, for example "&Next" on a button
    CLASS - The internal control classname such as "Edit" or "Button"
    CLASSNN - The ClassnameNN value as used in previous versions of AutoIt, such as "Edit1"
    REGEXPCLASS - Control classname using a regular expression
    X \ Y \ W \ H - The position and size of a control.
    INSTANCE - The 1-based instance when all given properties match.

    Oder sogar mit den Coordinaten im GUI [CLASS:Edit; X:11; Y:11; W:528; H:20]

  • Damit:
    [CLASS:TPageControl; INSTANCE:1]
    ControlClick("Titel", "", "[CLASS:TPageControl; INSTANCE:1]") müsste funzen

    Padmak

    Edit: Grr^^

  • Ja genau, danke euch beiden lol... habs grade auch rausgefunden, dass ich auch die CLASS eingeben kann und nicht nur die ID brauche. funzt jetzt alles perfekt :)