Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

Current Time Range

$
0
0
It's been years since I've posted, I think originally when I created my account I had a question about MM Bot. This is my first time doing any real scripting and I must say I'm having a blast. I understood the first basic scripts in the "Examples" folder well enough and have built off of them. For me there seems to be a very large difference between those and the include scripts.

Anyway I'm looking for some advice on how to set a somewhat top level check on the current system time. I'm writing a script that I will be running on a virtual computer 24-7 and I'm thinking the code will look something like this:

Select
Case {CurrentTime 8am - 11am}
  Global $meal = "Breakfast"
Case {CurrentTime 11:01am - 4pm}
  Global $meal = "Lunch"
Case {CurrentTime 4:01pm - 8pm}
  Global $meal = "Dinner"
Case {CurrentTime 8:01pm - 1am}
  Global $meal = "Evening"
Case {CurrentTime 1:01am - 7:59am}
  Global $meal = "Closed"
EndSelect


I just used plain english for the part inbetween "{" & "}" markers to give you an idea of what I'm looking to do. I have looked at some of the time stuff in the help file and the includes and I just can't figure out how to do it.

That's what I'm thinking at this point. Again I'm a newb so if there is something better than Select / Case I welcome advice on that.

Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>