Jump to content

Help with operators


Recommended Posts

This is probably a pretty simple thing to answer, as I'm sure I have just overlooked something but I am trying to use the "NOT" operator in an if statement and it doesn't seem to want to work. Here is what I am trying to do.

$yes = "yes"
$no = "no"
If $yes NOT $no Then
   MsgBox(0, "t", "works")
EndIf

What I want it to do is show the msg box but for some reason it isn't and I can't figure out why. I've googled it but can't seem to find any good examples, suggestions?

Sorry I figured it out, i feel dumb : /

Edited by Reeling
Link to comment
Share on other sites

$yes = "yes"
$no = "no"
If NOT $yes == $no Then
   MsgBox(0, "t", "works 1")
EndIf

$yes = "yes"
$no = "no"
If NOT ($yes == $no) Then
   MsgBox(0, "t", "works 2")
EndIf


$yes = "yes"
$no = "no"
If $yes <> $no Then
   MsgBox(0, "t", "works 3")
EndIf

Edited by JohnOne

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...