Anfängerfrage

  • Ich habe ein problem: ich will, dass AutoIt was in ein minimiertes Chatfenster schreibt, aber jedesmal wenn ich das Chatfenster schließe und wieder öffne, ändert sich die control ID. Kann ich das irgendwie so machen dass die sich dann im Skript automatisch anpasst?

    PS: Falls ich irgendwas falsch gemacht haben sollte, teilt es mir mit (ist mein erster Post) xD

    Spoiler anzeigen
    [autoit]

    #include <GUIConstants.au3>

    [/autoit] [autoit][/autoit] [autoit]

    #Region ### START Koda GUI section ### Form=c:\programme\autoit3\eigene\gui\Chat.kxf
    $Form2 = GUICreate("Chat", 168, 176, 193, 127)
    $Checkbox1 = GUICtrlCreateCheckbox("Chat 1", 24, 24, 65, 17)
    $Input = GUICtrlCreateInput("", 24, 96, 121, 21)
    $Button1 = GUICtrlCreateButton("Button", 24, 128, 75, 25, 0)
    $Label1 = GUICtrlCreateLabel("by Horzt", 112, 144, 43, 17)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

    [/autoit] [autoit][/autoit] [autoit]

    While 1
    $nMsg = GUIGetMsg()
    If $nMsg = $button1 Then
    If GUICtrlRead($Checkbox1) = $GUI_CHECKED Then
    ControlSend( "Chat", "", 198464, GUICtrlRead($Input) )
    ControlSend( "Chat", "", 198464, "{enter}" )
    EndIf
    EndIf
    If $nMsg = $GUI_EVENT_CLOSE Then ExitLoop
    WEnd

    [/autoit]

    Einmal editiert, zuletzt von Horzt (15. Mai 2008 um 15:01)