1. Open a date picker
2. Save the picked date in a variable
3. Open the date picker again
4. Save the picked date in another variable
Exit the loop. The goal is to be able to pick a start and end date, and get each date in a separate variable. What I have so far does not work and nags me about having a "Return" before the "}", but doing that only breaks the loop. Also, have I named this second GUI correctly since I have the same GUI earlier in the script?
Code: Select all
^T::
loopcount = 0
Loop, 2
{
loopcount += 1
Gui, 2:Add, MonthCal, xDate
Gui, 2:Add, Button,Default,OK
Gui, 2:Show, x800 y200, coolgui
WinWaitClose, coolgui
Gui, Destroy
2ButtonOK:
Gui,Submit
FormatTime, dato, %date%, dd.MM.yy
dato%loopcount% = %dato%
}
MsgBox % dato1
MsgBox % dato2
Return