gcue Posted April 18, 2008 Posted April 18, 2008 trying to express not equal to.. tried <> but it didnt seem to work If $broadcast="2" Then $broadcast="Disabled" EndIf If $broadcast <> "2" Then $broadcast="Enabled" EndIf
Valuater Posted April 18, 2008 Posted April 18, 2008 You did it right $broadcast = 1 If $broadcast="2" Then $broadcast="Disabled" EndIf If $broadcast <> "2" Then $broadcast="Enabled" EndIf MsgBox(0x0,"", $broadcast) 8)
someone Posted April 18, 2008 Posted April 18, 2008 Other then what Val said only thing is in this code if $broadcast="2" then the value for $broadcast will be overwritten with "Disabled", thus satisfying $broadcast<>"2" (because it now equals "Disabled") which then make it "Enabled" While ProcessExists('Andrews bad day.exe') BlockInput(1) SoundPlay('Music.wav') SoundSetWaveVolume('Louder') WEnd
Valuater Posted April 18, 2008 Posted April 18, 2008 (edited) Other then what Val said only thing is in this code if $broadcast="2" then the value for $broadcast will be overwritten with "Disabled", thus satisfying $broadcast<>"2" (because it now equals "Disabled") which then make it "Enabled" good point.... I was sure he was testing by "numbers" Another approach $broadcast = 1 If $broadcast = "2" Then $broadcast = "Disabled" Else $broadcast = "Enabled" EndIf MsgBox(0x0, "", $broadcast) 8) Edited April 18, 2008 by Valuater
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