"Quick 'n Dirty"
#include <GUIConstants.au3>
[/autoit] [autoit][/autoit] [autoit]$Form1 = GUICreate("BLLN", 180, 87, 193, 125)
$Combo1 = GUICtrlCreateCombo("dk01", 56, 8, 113, 25)
GUICtrlSetData(-1, "dk01|dk02|d01|d12", "dk01")
$In1 = GUICtrlCreateInput("", 56, 32, 113, 21)
GUICtrlSetLimit(-1, 4, 4)
$In2 = GUICtrlCreateInput("", 56, 56, 113, 21)
$Lab1 = GUICtrlCreateLabel("BLLN", 8, 8, 38, 20)
$Lab2 = GUICtrlCreateLabel("Eingabe", 8, 32, 43, 17)
$Lab3 = GUICtrlCreateLabel("Ausgabe", 8, 56, 46, 17)
GUISetState(@SW_SHOW)
AdlibRegister("_check")
$file = "test.txt"
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
Func _check()
If StringLen(GUICtrlRead($In1)) = 4 Then
GUICtrlSetData($In2, _BllRead($file, GUICtrlRead($Combo1), GUICtrlRead($In1), ""))
EndIf
EndFunc ;==>_check
;Die Original _IniRead() müsste von SEuBo sein. Hab hier lediglich das Pattern leicht angepasst.
Func _BllRead($sPath, $sSection, $sKey, $sDefault)
$aRet = StringRegExp(FileRead($sPath), '(?i)\[\Q' & $sSection & '\E]\s+(?>.+\s+)*?\Q' & $sKey & '\E\s*:\s*([^\n\r]+)', 1)
If @error Then Return $sDefault
Return $aRet[0]
EndFunc ;==>_BllRead