Question Time

Discussion, questions and support.
Post Reply
stevenwi87
Posts: 10
Joined: Jul 21st, ’19, 11:22

Post by stevenwi87 » Jul 21st, ’19, 11:26

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}
else
if (A_Hour<14)
Send, afternoon{space}
else
if (A_Hour<19)
Send, night1{space}
User avatar
Tom
Posts: 791
Joined: Nov 24th, ’15, 23:39

Post by Tom » Jul 22nd, ’19, 20:32

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
else
	Send, night1
Send, {Space}
stevenwi87
Posts: 10
Joined: Jul 21st, ’19, 11:22

Post by stevenwi87 » Jul 23rd, ’19, 04:48

great solve sir thanks
Post Reply