Input1 Fehler

  • Hi Leute

    Ich wollt einen kleinen Loginbot erstellen und die Daten sollen halt gesendet werden
    , doch da kommt nur bei Id 3 und bei Pw auch .,-.- (bin neu ,pls help)

    [autoit]

    #include <ButtonConstants.au3>#include <EditConstants.au3>#include <GUIConstantsEx.au3>#include <WindowsConstants.au3>#Region ### START Koda GUI section ### Form=$Form1 = GUICreate("Form1", 419, 170, 192, 124)$ID = GUICtrlCreateInput("ID", 16, 16, 161, 21)$Button1 = GUICtrlCreateButton("ok", 232, 16, 89, 25)GUISetState(@SW_SHOW)#EndRegion ### END Koda GUI section ###
    While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Case $Button1 Run ("notepad.exe") Sleep (1000) Send($ID) Exit
    EndSwitchWEnd]

    [/autoit]

    Einmal editiert, zuletzt von Silcc (9. April 2012 um 21:36)

  • stell mal bitte dein gesammtes script rein, dann wirds einfacher dir zu helfen :)

    hab hier mal was gescripted:

    Spoiler anzeigen
    [autoit]

    #include <ButtonConstants.au3>
    #include <EditConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>

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

    $GUI = GUICreate("", 165, 62, 192, 124)
    $id = GUICtrlCreateInput("id:", 4, 4, 121, 21)
    $button = GUICtrlCreateButton("start", 4, 32, 123, 25, $WS_GROUP)
    GUISetState(@SW_SHOW)

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

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit

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

    Case $button
    run("notepad.exe")
    WinWaitActive("Unbenannt - Editor")
    send(GUICtrlRead($id))

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

    EndSwitch
    WEnd

    [/autoit]

    schau einfach mal was bei dir anders ist :D

    mfg Yellow

    §1 Ich kann nicht für meine scripts inhaftiert werden, auch wenn bereits 3 Menschen erblindeten an den Folgen der Korrekturlesung.  8o

    2 Mal editiert, zuletzt von YellowWeedSeed (9. April 2012 um 22:00)

  • Ich habe es gerade versucht neu zu Scripten, jedoch kamen da auf einmal 2 Balken die nicht weg gehen.

    Hier mein Script:

    [autoit]

    #include <ButtonConstants.au3>#include <EditConstants.au3>#include <GUIConstantsEx.au3>#include <StaticConstants.au3>#include <WindowsConstants.au3>#Region ### START Koda GUI section ### Form=$Format1 = GUICreate("Login-Bot", 314, 121, 192, 124)GUISetBkColor(0x00FFFF)GUICtrlCreateInput("", 48, 24, 121, 21)GUICtrlCreateInput("", 48, 72, 121, 21)$ID = GUICtrlCreateInput("",-1, 9, 400, 0, "Xirod")$Label1 = GUICtrlCreateLabel(16, 24, 21, 20)$Label2 = GUICtrlCreateLabel("Pw", 8, 72, 36, 21)$PW = GUICtrlCreateInput("",-1, 10, 400, 0, "Xirod")$Button1 = GUICtrlCreateButton("Login", 208, 32, 83, 57)GUISetState(@SW_SHOW)#EndRegion ### END Koda GUI section ###
    While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Case $Button1 $Variable = PixelSearch (212,170,1249,800,0x46121B) If IsArray ($Variable) = True Then MouseMove ($Variable [0], $Variable [1],1) MouseClick ("left")Sleep(2000)Send(GUICtrlRead($ID))Sleep(200)send("{Tab}")Sleep(200)Send(GUICtrlRead($ID))Sleep(200)Send("{ENTER}") Exit EndIf
    EndSwitchWEnd

    [/autoit]
  • Meintest du dein Script vielleicht eher so?

    Spoiler anzeigen
    [autoit]

    #include <ButtonConstants.au3>
    #include <EditConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <StaticConstants.au3>
    #include <WindowsConstants.au3>
    #Region ### START Koda GUI section ### Form=
    $Format1 = GUICreate("Login-Bot", 314, 121, 192, 124)
    GUISetBkColor(0x00FFFF)
    $ID = GUICtrlCreateInput("", 48, 24, 121, 21)
    $PW = GUICtrlCreateInput("", 48, 72, 121, 21)
    $Label1 = GUICtrlCreateLabel("ID",16, 24, 21, 20)
    $Label2 = GUICtrlCreateLabel("Pw", 8, 72, 36, 21)
    $Button1 = GUICtrlCreateButton("Login", 208, 32, 83, 57)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###
    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $Button1
    $Variable = PixelSearch (212,170,1249,800,0x46121B)
    If IsArray ($Variable) = True Then
    MouseMove ($Variable [0], $Variable [1],1)
    MouseClick ("left")
    Sleep(2000)
    Send(GUICtrlRead($ID))
    Sleep(200)
    send("{Tab}")
    Sleep(200)
    Send(GUICtrlRead($PW))
    Sleep(200)
    Send("{ENTER}")
    Exit
    EndIf
    EndSwitch
    WEnd

    [/autoit]


    Wenn ich den Sinn deines Quellcodes richtig verstanden habe... was für ein Kauderwelsch ;)

    lg chess