Hi everybody!
It's been a long time from my last post, but now i have a new problem that I hope you can resolve!
So here it is: I've created a GUI with 3 input boxes and one button. You insert year, month and day in the inputboxes and press the button that will create a txt file inserting inputboxes values.
My problem it's that FileWrite does not insert my inputbox variables, but it insert YEAR=4, MONTH=3, DAY=13!
Here's my code: (I used KODA)
#Region ### START Koda GUI section ###
GUICreate("MY GUI", 135, 221, 195, 125)
$MESE_input = GUICtrlCreateInput("", 62, 72, 41, 21)
$ANNO_input = GUICtrlCreateInput("", 62, 44, 41, 21)
$Anno = GUICtrlCreateLabel("Anno:", 22, 48, 32, 17)
$Mese = GUICtrlCreateLabel("Mese:", 22, 77, 33, 17)
$PATCHbtn = GUICtrlCreateButton("1.) PATCH FILE", 8, 128, 121, 25, 0)
$GIORNO_input = GUICtrlCreateInput("", 62, 100, 41, 21)
$Label5 = GUICtrlCreateLabel("Giorno:", 21, 102, 38, 17)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $PATCHbtn
FileWrite("FILE.txt", "[KEY_DATE]" & @CRLF & "YEAR=" & $ANNO_input & @CRLF & "MONTH=" & $MESE_input & @CRLF & "DAY=" & $GIORNO_input & @CRLF & "[NEW_DATE]" & @CRLF & "YEAR=2020" & @CRLF & "MONTH=12" & @CRLF & "DAY=31")
EndSwitch
WEnd
Attached there's the file that FileWrite has to create.
I hope in your support!
Best regards, NGM FILE.txt