Code: Select all
s::
InputBox, grade, Enter the Grade Earned,
If (%grade% = A-)
MsgBox, THIS WAS AN A-
else
MsgBox, Not an A-
In this script, it uses %%s for the variable to see its value. Please correct me if I am wrong.
Code: Select all
s::
InputBox, grade, Enter the Grade Earned,
If (%grade% = A-)
MsgBox, THIS WAS AN A-
else
MsgBox, Not an A-
Code: Select all
If (grade = "A-")
Variable names in an expression are not enclosed in percent signs (except for pseudo-arrays and other double references). Consequently, literal strings must be enclosed in double quotes to distinguish them from variables.
Code: Select all
If grade = A-