Jump to content

Recommended Posts

Posted

$Key = 0

If $Key = "{SPACE}" Then

MsgBox(0, "??", "???")

EndIf

This script will prompt message box ....

0 == "{SPACE}" ?????

Posted

First of all, why are you comparing a number to a string? Second, the behavior is expected. The string is promoted to a number. Since the string itself is not a number, it becomes "0". Therefore, zero is compared to zero which is of course true.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...