"For example, specifying vMyEdit would store the control's contents in the variable MyEdit whenever the Gui Submit command is used."
I'm not using GuiSubmit but once I change the date in the DateTime control it updated %CustomDate%, why is that?
Code: Select all
#SingleInstance force
#NoEnv ; no idea what it does
CustomDate := ""
GuiWidth := 180
Gui +LastFound +AlwaysOnTop
Gui, Add, DateTime, vCustomDate w120 r1 ChooseNone, yyyy-MM-dd
Gui, Add, Button, gSET x+4 , SET
Gui, Add, Text, % "x7 y+1 w" (GuiWidth-14) " h0 vP"
GuiControlGet, P, Pos
H := PY + PH
Gui, Show, % "w" GuiWidth " NA x500", TestUI
Loop
{
Sleep, 5000
MsgBox, %CustomDate%
}
Set:
GuiControlGet, CustomDate
if (CustomDate != "")
FormatTime, CustomDate, %CustomDate%, yyyy-MM-dd
return
GuiClose:
ExitApp