Hallo,
mein Problem ist folgendes:
Ich habe ein Programm mit autoIt programmiert, bei dem ein Pfad benötigt wird. Da hab ich mir gedacht naja bevor man jedes mal den Pfad eingeben muss speicher ich in in einer .ini Datei, aber irgentiwie funktioniert das nicht so ganz. Ich mache das jetzt anhand eines Beispieles deutlich.
Ich hoffe jmd kann mir helfen :handsdown:
mein Problem ist folgendes:
Ich habe ein Programm mit autoIt programmiert, bei dem ein Pfad benötigt wird. Da hab ich mir gedacht naja bevor man jedes mal den Pfad eingeben muss speicher ich in in einer .ini Datei, aber irgentiwie funktioniert das nicht so ganz. Ich mache das jetzt anhand eines Beispieles deutlich.
Code:
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form2 = GUICreate("Beispiel-PLS HELP", 496, 136, 196, 117)
GUISetBkColor(0xFFFF00)
$Input1 = GUICtrlCreateInput("", 8, 8, 305, 21)
$Button1 = GUICtrlCreateButton("Durchsuchen", 344, 8, 105, 25, 0)
GUICtrlSetBkColor(-1, 0x808000)
$Button2 = GUICtrlCreateButton("Save", 136, 56, 209, 49, 0)
GUICtrlSetBkColor(-1, 0xFF0000)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
$Pfad1 = FileOpenDialog("Datei suchen","C:\" ,"")
GUICtrlSetData($Input1,$Pfad1)
Case $Button2
$Datei = GUICtrlRead($Input1)
IniWrite("config.ini", "Datei", "Datei", $Datei)
EndSwitch
WEnd