AUTOHOTKEY/레퍼런스
If var [not] between L and U 변수의 값이 상한과 하한의 사이에 있을지로 분기
님투
2007. 11. 5. 14:34
반응형
If var [not] between L and U
변수의 값이 상한과 하한의 사이에 있을지로 분기
if Var between LowerBound and UpperBound if Var not between LowerBound and UpperBound
Parameters
인수명 | 설명 |
---|---|
var | 변수명 |
LowerBound | 하한 |
UpperBound | 상한 |
Remarks
3개의 당겨 수가 모두 수치의 경우, 비교는 수치로서 행해진다.
문자열이 포함되는 경우, 문자 코드순서의 순위로 비교된다.
문자열로서 비교하는 경우, StringCaseSense그리고 대문자 소문자의 차이를 고려할지를 설정할 수 있다.
Related
IfEqual/Greater/Less, if var in MatchList, if var is type, IfInString, StringCaseSense, EnvAdd , Blocks, Else
Example(s)
if var between 1 and 5 MsgBox, %var% is in the range 1 to 5, inclusive. if var not between 0.0 and 1.0 MsgBox %var% is not in the range 0.0 to 1.0, inclusive. if var between blue and red MsgBox %var% is alphabetically between blue and red. LowerLimit = 1 UpperLimit = 10 InputBox, UserInput, Enter a number between %LowerLimit% and %UpperLimit% if UserInput not between %LowerLimit% and %UpperLimit% MsgBox Your input is not within the valid range.
반응형