Editfeld Subscript used with non-Array variable

    • Offizieller Beitrag

    Ja aber wo ist das Problem? Einfach, wie schon mehrfach gesagt:

    Spoiler anzeigen
    [autoit]

    #Include <GuiEdit.au3>
    GUICreate('')
    $edit = GUICtrlCreateEdit('', 10, 10, 300, 200)
    GUICtrlSetData(-1, @CRLF & @CRLF & @CRLF & @CRLF & 'Ilse')
    $btInsert = GUICtrlCreateButton('Einfügen hinter Ilse', 10, 230, 120, 20)
    GUISetState()

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

    While 1
    Switch GUIGetMsg()
    Case -3
    Exit
    Case $btInsert
    $iPos = StringInStr(GUICtrlRead($edit), 'Ilse', 1)
    If $iPos Then
    _GUICtrlEdit_InsertText($edit, @CRLF & "Dieser Code wird eingefügt", $iPos + StringLen('Ilse'))
    EndIf
    EndSwitch
    WEnd

    [/autoit]