Jump to content
Sign in to follow this  
sugi

If Not @ComputerName = $NewComputerName Then

Recommended Posts

sugi

Either I'm stupid or I've found a bug:

$NewComputerName = @ComputerName & 'xx'
MsgBox(4096, @ComputerName, $NewComputerName)
If Not @ComputerName = $NewComputerName Then
    MsgBox(4096, 'DING', '')
    Exit (0)
EndIf

In my theory, @ComputerName and $NewComputerName are never the same because of the first line. So I should get two message boxes... but no matter what I only get the first one?

Share this post


Link to post
Share on other sites
Valik

Should be:

If Not (@CompuerName = $NewComputerName) Then ...

or

If @ComputerName <> $NewComputerName Then ...

Share this post


Link to post
Share on other sites
sugi

I knew it was something stupid...

not @ComputerName = 1

(1 = $NewComputerName) = 0...

Share this post


Link to post
Share on other sites

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
Sign in to follow this  

×