Example code in documentation:
Code: Select all
if var between %VarLow% and %VarHigh%
MsgBox %var% is between %VarLow% and %VarHigh%.
Code: Select all
InputBox, Request, Folder Navigator, Enter a year ; ASSUME USER ENTERS 2015
;STOPS SCRIPT IF BLANK VALUE
If (Request = "") {
Return
}
;INSTRUCTIONS: ENTER THE YEAR IN THE FORMAT XXXX OR XX
Else {
;MsgBox, % Request ; Sanity check to see that it actually stores 2015 in the Request variable
;MsgBox, % (if %Request% between 2017 and %A_YYYY%) ; Evaluates to False with values that are True (Ex 2018)
MsgBox, % (if Request between 2017 and A_YYYY) ; Evaluates to True with 2015 as input
Return
}