Page 1 of 1

Question Time

Posted: Jul 21st, ’19, 11:26
by stevenwi87
hi i like to script good morning , good afternoon , good evening
the situation time is

04:00 -10:00 morning
10:00 - 14:00 afternoon
14:00 - 18:30 night1
18:30 - 04.00 night2

please help me fix this

Send, Good{Space}
if (A_Hour<10)
Send, Morning{space}
if (A_Hour<14)
Send, afternoon{space}
if (A_Hour<19)
Send, night1{space}

Re: Question Time

Posted: Jul 22nd, ’19, 20:32
by Tom
Something like this?

Code: Select all

Send, Good{Space}
if ((A_Hour=18) and (A_Min>30)) or (A_Hour>=19) or (A_Hour<4)
	Send, night2
else if (A_Hour<10)
	Send, morning
else if (A_Hour<14)
	Send, afternoon
	Send, night1
Send, {Space}

Re: Question Time

Posted: Jul 23rd, ’19, 04:48
by stevenwi87
great solve sir thanks