Jump to content
Sign in to follow this  
Ober

True/False Swapping

Recommended Posts

Ober

Sorry if this has been posted somewhere, being such a simple thing i figure it woulda been everywhere but couldnt find it searching...

Basically im wanting to Swap True/False with a keypress...

at this molment im doing this

HotKeySet("{F7}", "QF")

Func QF()

If QF = True then

QF = False

Else

QF = True

EndIf

EndFunc

but i cant imagine thats the best or most effecient way to do it... i would think it could be done with a single line of code if i knew the syntax, shrug...

Thanks...

Share this post


Link to post
Share on other sites
Ober

so this is what i can shorten it to.... tyvm! exactly what i was looking for...

HotKeySet("{F7}", "QF")

Func QF()

$QF = Not $QF

EndFunc

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  

×