How to read the variable value in AHK?

Solution 1:

<^<!/::
    MsgBox,4,Timer,Do you want to set a timer?
    IfMsgBox Yes
    {
        InputBox, Time1, hour, What hour? (Please show in 24:00 format)
        if ErrorLevel ; CANCEL was pressed
            return
        if (Time1 > 23)
        {
            MsgBox, wrong hour specification
            return
        }
        InputBox,Time2, minute, What minute?
        if ErrorLevel
            return
        if (Time2 > 59)
        {
            MsgBox, wrong minute specification
            return
        }
        SetTimer, Timer, 1000 
    }
return

Timer:
    if (A_Hour = Time1 && A_Min = Time2)
    {
        SetTimer, Timer, off
        MsgBox,64,Timer,Timer done.
    }
return