beispiel funktioniert mit neuer autoit version nicht mehr....

  • hi,
    ich hab mir grad die neue autoit version geladen und jetzt funktioniert mein beispielscript nicht mehr, das aber vorher gelaufen ist....

    Spoiler anzeigen
    [autoit]

    #include <GUIConstants.au3>
    #include <GuiEdit.au3>

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

    opt('MustDeclareVars', 1)

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

    Dim $myedit, $Status, $msg, $Btn_GET
    Dim $s_text = "AutoIt v3 is a freeware BASIC-like scripting language" & @CRLF & _
    "designed for automating the Windows GUI." & @CRLF & _
    "It uses a combination of simulated keystrokes," & @CRLF & _
    "mouse movement and window/control manipulation" & @CRLF & _
    "in order to automate tasks in a way not possible" & @CRLF & _
    "or reliable with other languages (e.g. VBScript and SendKeys)."

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

    GUICreate("Edit Get Line", 392, 254)

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

    $myedit = GUICtrlCreateEdit($s_text, 140, 32, 121, 97, BitOR($ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $WS_VSCROLL, $WS_HSCROLL, $ES_MULTILINE))
    GUICtrlSetLimit($myedit, 1500)
    $Status = GUICtrlCreateLabel("", 0, 234, 392, 20, BitOR($SS_SUNKEN, $SS_CENTER))
    $Btn_GET = GUICtrlCreateButton("Get Line 2", 150, 130, 90, 40, $BS_MULTILINE)

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

    GUISetState()

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

    ; Run the GUI until the dialog is closed
    While 1
    $msg = GUIGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
    ExitLoop
    Case $msg = $Btn_GET
    Local $line = _GUICtrlEditGetLine($myedit, 2)
    If @error == $EC_ERR Then
    GUICtrlSetData($Status, "Line: Invalid")
    Else
    GUICtrlSetData($Status, "Line: " & $line)
    EndIf
    EndSelect
    WEnd
    GUIDelete()

    [/autoit]

    Ich bekomme jetzt diese schöne fehlermeldung:

    Spoiler anzeigen

    D:\Dokumente und Einstellungen\Danny\Desktop\test2.au3(33,57) : ERROR: _GUICtrlEditGetLine(): undefined function.
    Local $line = _GUICtrlEditGetLine($myedit, 2)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
    D:\Dokumente und Einstellungen\Danny\Desktop\test2.au3 - 1 error(s), 0 warning(s)

    Ich hoffe dass das bei meinen anderen scripten nicht auch so ist :(

    ....kleine kritik am rande

    gruß

  • Hi,

    geht doch !! ;)

    Spoiler anzeigen
    [autoit]


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

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

    opt('MustDeclareVars', 1)

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

    Dim $myedit, $Status, $msg, $Btn_GET
    Dim $s_text = "AutoIt v3 is a freeware BASIC-like scripting language" & @CRLF & _
    "designed for automating the Windows GUI." & @CRLF & _
    "It uses a combination of simulated keystrokes," & @CRLF & _
    "mouse movement and window/control manipulation" & @CRLF & _
    "in order to automate tasks in a way not possible" & @CRLF & _
    "or reliable with other languages (e.g. VBScript and SendKeys)."

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

    GUICreate("Edit Get Line", 392, 254)

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

    $myedit = GUICtrlCreateEdit($s_text, 140, 32, 121, 97, BitOR($ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $WS_VSCROLL, $WS_HSCROLL, $ES_MULTILINE))
    GUICtrlSetLimit($myedit, 1500)
    $Status = GUICtrlCreateLabel("", 0, 234, 392, 20, BitOR($SS_SUNKEN, $SS_CENTER))
    $Btn_GET = GUICtrlCreateButton("Get Line 2", 150, 130, 90, 40, $BS_MULTILINE)

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

    GUISetState()

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

    ; Run the GUI until the dialog is closed
    While 1
    $msg = GUIGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
    ExitLoop
    Case $msg = $Btn_GET
    Local $line = _GUICtrlEditGetLine($myedit, 2)
    If @error == $EC_ERR Then
    GUICtrlSetData($Status, "Line: Invalid")
    Else
    GUICtrlSetData($Status, "Line: " & $line)
    EndIf
    EndSelect
    WEnd
    GUIDelete()

    [/autoit]


    Schönes OFest und weiterhin
    viel Erfolg !

  • @beide:
    nein, funktioniert nicht

    und meine kritik ist ja, dass das ja eig nicht sein darf oder^^
    ich mein, dass ein script,dass vorher funktioniert hat,jetzt nicht mehr wegen einem unterstrich funktioniert...#

    gruß

    • Offizieller Beitrag

    Hi,

    es geht einwandfrei:

    Spoiler anzeigen
    [autoit]

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

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

    opt('MustDeclareVars', 1)

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

    Dim $myedit, $Status, $msg, $Btn_GET
    Dim $s_text = "AutoIt v3 is a freeware BASIC-like scripting language" & @CRLF & _
    "designed for automating the Windows GUI." & @CRLF & _
    "It uses a combination of simulated keystrokes," & @CRLF & _
    "mouse movement and window/control manipulation" & @CRLF & _
    "in order to automate tasks in a way not possible" & @CRLF & _
    "or reliable with other languages (e.g. VBScript and SendKeys)."

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

    GUICreate("Edit Get Line", 392, 254)

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

    $myedit = GUICtrlCreateEdit($s_text, 140, 32, 121, 97, BitOR($ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $WS_VSCROLL, $WS_HSCROLL, $ES_MULTILINE))
    GUICtrlSetLimit($myedit, 1500)
    $Status = GUICtrlCreateLabel("", 0, 234, 392, 20, BitOR($SS_SUNKEN, $SS_CENTER))
    $Btn_GET = GUICtrlCreateButton("Get Line 2", 150, 130, 90, 40, $BS_MULTILINE)

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

    GUISetState()

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

    ; Run the GUI until the dialog is closed
    While 1
    $msg = GUIGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
    ExitLoop
    Case $msg = $Btn_GET
    Local $line = _GUICtrlEdit_GetLine($myedit, 2)
    If @error == $EC_ERR Then
    GUICtrlSetData($Status, "Line: Invalid")
    Else
    GUICtrlSetData($Status, "Line: " & $line)
    EndIf
    EndSelect
    WEnd
    GUIDelete()

    [/autoit]

    Doch das kann immer passieren.

    Mega

  • hmm, ok es lag an den includes und dem unterstrich.
    Xenobiologist
    naja, wenn sowas öfters passieren sollte, sehe ich das nicht so.,..

    weil dann bleib ich lieber bei der alten version und hab damit keine probleme...

    gruß

  • ja im prinzip hast du ja recht. wenn das nicht häufig passiert, ist das völlig in ordnung, aber manchmal hat man eben eeewig lange scripte und wenn man
    dann später daran herumbasteln muss ,find ich, ist das ziemlich unvorteilhaft.
    Whatever, im endeffekt kann man eh nichts dran ändern. da muss man eben durch^^