Gui, -MinimizeBox -MaximizeBox +hwndGuiID
Gui, Add, Text,, Start date:
Gui, Add, MonthCal, vStartCal
Gui, Add, Text,, End date:
Gui, Add, MonthCal, vEndCal
Gui, Add, Button, gAcceptBtn, Accept dates and continue
Gui, Show,, Get Dates
Loop
{
WinWaitClose, ahk_id %GuiID%
MsgBox, 4132, Check dates, % "Start Date: " StartDate "`nEnd Date: " EndDate "`n`nIs this correct?"
IfMsgBox, Yes
break
Gui, Show
}
return
;
; *** End of auto-execute section ***
AcceptBtn:
Gui, Submit
StartDate := SubStr(StartCal, 5, 2) . SubStr(StartCal, 7, 2) . SubStr(StartCal, 3, 2)
EndDate := SubStr(EndCal, 5, 2) . SubStr(EndCal, 7, 2) . SubStr(EndCal, 3, 2)
Esc::ExitApp