TheCrimsonCrusader Posted January 30, 2019 Posted January 30, 2019 Greetings. I am trying to have the script below run where for the 2019 calendar year, if the current month is greater than or equal to January and less than the month of July send one message box and if if the current month is greater than or equal to July and and less than or equal to the month of December send a different message box. Somewhere I am off, but I can't figure out where. Thanks for any assistance in advance! If @Year = 2019 Then If @MON >= "1" or @MON < "7" Then MsgBox(262144,"","Date range is between January and June.") If @MON >= "7" and @MON <= "12" Then MsgBox(262144,"","Date range is between July and December.") EndIf
Nine Posted January 30, 2019 Posted January 30, 2019 there is a or where it should be a and ! “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
TheCrimsonCrusader Posted January 30, 2019 Author Posted January 30, 2019 (edited) Doh't1 I forgot to change that back after I was adding some additional date parameters when testing. Anyway, even when I change it from "and" to "or", I still get both message box prompts. So I guess that's happening because the and < 12, but not sure how to address that where it will only acknowledge the month range between July and December like it does for January through the end of June. Edited January 30, 2019 by TheCrimsonCrusader
TheCrimsonCrusader Posted January 30, 2019 Author Posted January 30, 2019 Uh, it help if I would have put a 0 before the single digit numbers. PBKAC alert!
Gianni Posted January 31, 2019 Posted January 31, 2019 don't use quotes around numbers... Chimp small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt....
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now