scept Posted October 25, 2010 Share Posted October 25, 2010 source If $connected = true Then $connected = false source source If $connected = false Then $connected = true source Something like : SWITCH $connected or some other function (because of switch already taken) Link to comment Share on other sites More sharing options...
AlmarM Posted October 25, 2010 Share Posted October 25, 2010 (edited) Global $bConnected = False MsgBox(0, "Before", $bConnected) $bConnected = Not $bConnected MsgBox(0, "After", $bConnected) $bConnected = Not $bConnected MsgBox(0, "Another After", $bConnected) As a function. Global $bConnected = False MsgBox(0, "Before", $bConnected) SwitchBoolean($bConnected) MsgBox(0, "After", $bConnected) SwitchBoolean($bConnected) MsgBox(0, "Another After", $bConnected) Func SwitchBoolean(ByRef $bBoolean) $bBoolean = Not $bBoolean Return EndFunc Also, welcome to the forums. EDIT: Typo Edited October 25, 2010 by AlmarM Minesweeper A minesweeper game created in autoit, source available. _Mouse_UDF An UDF for registering functions to mouse events, made in pure autoit. 2D Hitbox Editor A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes. Link to comment Share on other sites More sharing options...
Necromorph Posted October 25, 2010 Share Posted October 25, 2010 im not sure i understand this, but maybe this Switch $connected case True $connected = False case False $connected = True EndSwitch Link to comment Share on other sites More sharing options...
Bowmore Posted October 25, 2010 Share Posted October 25, 2010 $connected = Not $connected "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to build bigger and better idiots. So far, the universe is winning."- Rick Cook 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