TCP problem >.<

  • Hallo,
    ich hab ein problem (bin neu bei autoit) mit meinem script das soll eine domain zu ner ip umwandel aber immer wenn man auf den button drückt kommt als meldung "False".
    Hier mal das script

    [autoit]

    #include <ButtonConstants.au3>
    #include <EditConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <StaticConstants.au3>
    #include <WindowsConstants.au3>
    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("Domain to IP", 234, 184, 195, 124)
    $Input1 = GUICtrlCreateInput("Domain hier rein :)", 8, 16, 209, 21)
    $Button1 = GUICtrlCreateButton("IP herrausfinden", 8, 48, 201, 65, $WS_GROUP)
    $Label1 = GUICtrlCreateLabel("(Made by tooti)", 0, 136, 204, 34)
    GUICtrlSetFont(-1, 20, 400, 0, "el&font gohtic!")
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

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

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $Button1
    IP()
    EndSwitch
    WEnd

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

    Func IP()
    TCPStartup()
    msgbox(0,"IP???",$Input1=TCPNameToIP() )
    Exit
    IP()
    EndFunc

    [/autoit]


    ;(

  • Die MsgBox müsste so aussehen.
    Und du brauchst auch nur die beiden Includes

    [autoit]


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

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

    msgbox(0,"IP???",TCPNameToIP(GUICtrlRead($Input1)))

    [/autoit]

    MfG
    Der_Doc

  • [autoit]

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

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

    TCPStartup()

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

    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("Domain to IP", 234, 184, 195, 124)
    $Input1 = GUICtrlCreateInput("Domain hier rein :)", 8, 16, 209, 21)
    $Button1 = GUICtrlCreateButton("IP herrausfinden", 8, 48, 201, 65, $WS_GROUP)
    $Label1 = GUICtrlCreateLabel("(Made by tooti)", 0, 136, 204, 34)
    GUICtrlSetFont(-1, 20, 400, 0, "el&font gohtic!")
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

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

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $Button1
    $ip=TCPNameToIP(GUICtrlRead($Input1))
    If $ip<> "" Then msgbox(0,"IP???",$ip)
    If $ip="" Then MsgBox(0,"Fehler","Domain existiert nicht")
    EndSwitch
    WEnd

    [/autoit]

    Edit: Ich bekomms nicht hin...
    Kein Plan, warum die Formatierung verloren geht...
    So, jetzt klappts ^^
    Trotzdem zu spät...

    Spoiler anzeigen

    Grundkenntnisse in: C++, JavaScript
    Sehr gute Kenntnisse: PHP, JAVA, C und näturlich AutoIt


    Klaviatur, Anhang UDF, GDI+ Mühle

    Zitat

    "Wenn einen um 20h der Pizzadienst anruft und fragt, ob man's nur vergessen hat und ob man das gleiche
    möchte wie immer -- dann sollte man sein Bestellverhalten evtl überdenken"

    2 Mal editiert, zuletzt von Cartan12 (19. November 2010 um 18:14)