bear Posted December 13, 2006 Share Posted December 13, 2006 $Key = 0 If $Key = "{SPACE}" Then MsgBox(0, "??", "???") EndIf This script will prompt message box .... 0 == "{SPACE}" ????? Link to comment Share on other sites More sharing options...
Valik Posted December 13, 2006 Share Posted December 13, 2006 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. Link to comment Share on other sites More sharing options...
Valuater Posted December 13, 2006 Share Posted December 13, 2006 ... 0 == "{SPACE}" ????? No.. per your question $Key = 0 If $Key == "{SPACE}" Then MsgBox(0, "??", "???") EndIf This script will NOT prompt message box .... 8) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now