Hallo Zusammen
Bin der Meinung dass bei der vorletzten Zeile der gewählte Computername erscheinen sollte, bis anhin kommt nur immer die Zahl 0
Bitte währe froh um tips und Hilfe damit der gewählte name erscheinen würde.
Danke für Eure Feedback
MC
Spoiler anzeigen
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
Opt('MustDeclareVars', 1)
Local $hname, $section
Example1()
Func Example1()
Local $msg
GUICreate(" GUI ") ; will create a dialog box that when displayed is centered
GUICtrlCreateLabel("HostName ", 11, 80)
$hname = GUICtrlCreateCombo("", 10, 102)
$section = IniReadSection("C:\Dokumente und Einstellungen\Administrator\Desktop\autoit\reg\muster.ini", "HostName")
For $i = 1 To UBound($section) - 1
GUICtrlSetData($hname, IniRead("muster.ini", "HostName", $i, ""))
Next
[/autoit] [autoit][/autoit] [autoit]GUISetState(@SW_SHOW) ; will display an empty dialog box
[/autoit] [autoit][/autoit] [autoit]; Run the GUI until the dialog is closed
While 1
$msg = GUIGetMsg()
If $msg = $GUI_EVENT_CLOSE Then ExitLoop
WEnd
GUIDelete()
MsgBox(1, "", GUICtrlRead($hname))
EndFunc ;==>Example1
Muster.ini
Spoiler anzeigen
[HostName]
1=save2L001
2=save2L002
3=save2L003
4=save2L004
5=save2L005
6=save2L006
7=save2L007
8=save2L008
9=save2L009
10=save2L010