Posted by member 37809 on 2003-08-01 21:00:35 link

ltns DaPCWiz.

You should cover all cases... afternoon isn't midnight to noon, or maybe it is for you :)

Nice idea for a theme function, so I indulge a bit here. Feela free to adjust according to lifestyle (untested btw):

*script bang !setGreet
*script gotoif ("%[hour]" <= 2) evening
*script gotoif ("%[hour]" <= 5) late
*script gotoif ("%[hour]" <= 7) early
*script gotoif ("%[hour]" <= 12) morning
*script gotoif ("%[hour]" >= 18) evening
; else it's afternoon
*script exec !NewLabelSetText "Good afternoon, $UserName$"
*script goto rest
*script label late
*script exec !NewLabelSetText "Go sleep, foo."
*script goto rest
*script label evening
*script exec !NewLabelSetText "Good evening, $UserName$"
*script goto rest
*script label early
*script exec !NewLabelSetText "Get some coffee."
*script goto rest
*script label morning
*script exec !NewLabelSetText "Good morning, $UserName$"
*script label rest
; you could have used *script exit, instead of coming here.
*script ~bang


For added variety, make files for each case and try Label's [randomLine()]