bluerein Posted October 16, 2008 Share Posted October 16, 2008 Were am i going wrong?? ;checkboxs $result=0 $check1 = GUICtrlCreateCheckbox("exit",50,50,15,15) If GuiCtrlRead ($check1) = $GUI_CHECKED then $result=1 If GuiCtrlRead ($check1) = $GUI_UNCHECKED then $result=0 $result keeps returming 0 regardless if the checkbox is checked or not Any ideas?? Link to comment Share on other sites More sharing options...
martin Posted October 16, 2008 Share Posted October 16, 2008 Were am i going wrong?? ;checkboxs $result=0 $check1 = GUICtrlCreateCheckbox("exit",50,50,15,15) If GuiCtrlRead ($check1) = $GUI_CHECKED then $result=1 If GuiCtrlRead ($check1) = $GUI_UNCHECKED then $result=0 $result keeps returming 0 regardless if the checkbox is checked or not Any ideas??GuiCtrlRead returns the state of the checkbox, but the state consists of more than the checked state since it will include whether it is shown or hidden for example. ;checkboxs $result=0 $check1 = GUICtrlCreateCheckbox("exit",50,50,15,15) If BitAnd(GuiCtrlRead ($check1),$GUI_CHECKED) then $result=1 If BitAnd(GuiCtrlRead ($check1), $GUI_UNCHECKED) then $result=0 Which is a shortened version of ;checkboxs $result=0 $check1 = GUICtrlCreateCheckbox("exit",50,50,15,15) If BitAnd(GuiCtrlRead ($check1),$GUI_CHECKED) = $GUI_CHECKED then $result=1 If BitAnd(GuiCtrlRead ($check1), $GUI_UNCHECKED) = $GUI_UNCHECKED then $result=0 Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
bluerein Posted October 16, 2008 Author Share Posted October 16, 2008 (edited) Thanks martin Think im still missing something here..... $return still = 0 regardless if its checked or not.... Basically If checkbox is checked I need $result =1 and If checkbox is unchecked I need $result =0 cheers edit!!! sorted it ...thanks Edited October 16, 2008 by bluerein 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