T
T
Tenji2021-07-17 20:17:23
autohotkey
Tenji, 2021-07-17 20:17:23

How to check a variable for a word in AutoHotKey?

in general, I have an inputbox with an input variable name, where they ask you what your name is.

he looks, if your name is equal to Test, then he msgbox'it So it is impossible.
and the rest it writes hello name
here is the code:
inputbox, name, hellobox, what's your name?
if (name === 'Test') {
msgbox, You can't do that.
} else {
msgbox, Hi %name%
}
Error at startup Error at line 2. Line text: 'Test' The leftmost character above is illegal in an expression.
What to do?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question