Jump to content
Sign in to follow this  

guictrlread() clarify please?

Recommended Posts


i'm having an obviously retarded problem.

i'm trying to use radio buttons to do stuff.

the problem with this is that after i started messing with GUICtrlRead()

i realised exactly how little i understand about this thing.

when the radio is unchecked it returns 4. not always 4. when it's checked, it returns 1, as far as i can see at least...

the help file, however, says it should return

The control identifier (controlID) as returned by a GUICtrlCreate... function.

in other words, i should see $GUI_CHECKED... in my ini file....

i understand this sounds COMPLETELY retarded, but i can't understand it in any other way.

please clarify what exactly i should see from guictrlread().

Share this post

Link to post
Share on other sites

i'm using autoit

i'm not sure whether it affects the situation...

is it possible that due to some circumstances, $GUI_CHECKED could be 1 and $GUI_UNCHECKED be 4?

i dumped their values into a text file aswell and they indeed are 4 and 1. to be honest, i'm slightly confused.

wouldn't it be easier to just write them off as natural numbers instead of constants hidden in a file?

do they change under any circumstances?

Share this post

Link to post
Share on other sites

$GUI_CHECKED and $GUI_UNCHECKED are variable representations of the actual numeric values which are 1 and 4 respectively

If BitAnd(GUICtrlRead($somecontrol), $GUI_UNCHECKED) = $GUI_UNCHECKED Then

is the same as

If BitAnd(GUICtrlRead($somecontrol), 4) = 4 Then

If you open the GUIConstantsEx.au3 file you can see what the actual values are.

Until you are totaly familiar with the numeric values I suggest you stay with the variable names and in fact most people will tell you to always use the variables. I always use them when the code will be read by others and I use only the numeric values when it's for me only. Any speed difference would be milli-microseconds at best so that's not a consideration.


Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver: - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

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