Korrekt, aber nicht wenn die Funktion in einer "UDF" steht:
AutoIt
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include "Test2.au3"
Local $Form1 = GUICreate("Form1", 167, 96, 192, 182)
Local $Input1 = GUICtrlCreateInput("Input123", 8, 8, 121, 21)
Local $Button1 = GUICtrlCreateButton("Klick mich", 8, 30, 121, 21)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
_Testfunc()
EndSwitch
WEnd
;~ Func _Testfunc()
;~ MsgBox(0, "", GUICtrlRead($Input1))
;~ EndFunc
Alles anzeigen
Test2.au
Funktioniert zwar, aber nicht schön:
warning: $Input1: possibly used before declaration.
MsgBox(0, "", GUICtrlRead($Input1)
