Jump to content

ned98

Members
  • Posts

    5
  • Joined

  • Last visited

ned98's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. Thank you really very much for help! Now the file is correct!
  2. 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
  3. Thank you very much for the help! This code works perfectly.
  4. thank you very much for your prompt reply! But there's another little problem: when I select the radio button and the checkbox, then press the STUPIDBUTTON, Two windows pop-up: the first - MsgBox(0, "ERRORE", "abc...")- and the second - MsgBox (0, "TEST", "TEST COMPLETED." -. How can I solve this?
  5. How can I set multiple conditions for IF? Here's my problem: I need that only if a checkbox and a radio button are selected, a button can close the program. Here's my incorrect code: While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE MsgBox (0, "TEST", "Message Text.") Case $STUPIDBUTTON If $Radio1 = 1 Then MsgBox(0, "ERRORE", "abc...") ElseIf $Checkbox1 = 1 Then MsgBox (0, "TEST", "TEST COMPLETED.") Then Exit EndIf EndSwitch WEnd
×
×
  • Create New...