Champak Posted May 2, 2006 Share Posted May 2, 2006 Help please, I can't find the following two. How can I say: If this is checked OR this is checked OR this is checked, then check this, end if. and If this is checked OR this is checked OR this is checked, then do this, end if. Also, I understand that I can check if a box is checked with: $Binsert=GuiCtrlRead($insert) if $Binsert = 1 then Send("!+i") Endif But I don't understand how to check if it is not checked. I've tried "= 0 then" but no luck. I looked this over If BitAnd(GUICtrlRead($viewstatusitem),$GUI_CHECKED) = $GUI_CHECKED Then thinking that was the solution, but couldn't quite wrap my head around it. Thanks. Link to comment Share on other sites More sharing options...
Valuater Posted May 2, 2006 Share Posted May 2, 2006 maybe If BitAnd(GUICtrlRead($insert),$GUI_CHECKED) = $GUI_CHECKED Then Send("!+i") Else MsgBox(0,0,"not checked") Endif 8) Link to comment Share on other sites More sharing options...
Champak Posted May 2, 2006 Author Share Posted May 2, 2006 (edited) I'm actually doing that already, but with this instead: $Binsert=GuiCtrlRead($insert) if $Binsert = 1 then Send("!+i") Else Blah blah Endif Problem is, there is something where it would have to actually be reversed, and it doesn't work like that. Ex: $Binsert=GuiCtrlRead($insert) if $Binsert = 1 then -------------------------this would be empty Else -------------------------this would be the function Endif This is because this if function would activate on the box not being checked. And it seems that I can't leave an empty "then" statement. So then I guess the question would be, Does Autoit send or do "empty functions". Also, really need to know if the if-or statement in the first post is possible with this, or a workaround please. Edited May 2, 2006 by Champak Link to comment Share on other sites More sharing options...
Valuater Posted May 2, 2006 Share Posted May 2, 2006 (edited) maybe If BitAnd(GUICtrlRead($insert),$GUI_CHECKED) <> $GUI_CHECKED Then MsgBox(0,0,"not checked") Else MsgBox(0,0,"checked") Endif notice the <> above... it means "different than" 8) Edit this is also possible If BitAnd(GUICtrlRead($insert),$GUI_CHECKED) = $GUI_CHECKED Then ; do nothing Else MsgBox(0,0,"not checked") Endif Edited May 2, 2006 by Valuater Link to comment Share on other sites More sharing options...
Champak Posted May 3, 2006 Author Share Posted May 3, 2006 I went with the second one. Thanks. I figured out I was doing the "or" statements wrong. So now the script is not crapping out with errors as before with the "or" statements, but it's not reading them. This is what I've tried so far: $BSends=GuiCtrlRead($send) $BInserts=GuiCtrlRead($insert) $BEQs=GuiCtrlRead($eq) if $BInserts Or _ $BSends Or _ $BEQs = 1 then Send("{F3}") AND $BSends=GuiCtrlRead($send) $BInserts=GuiCtrlRead($insert) $BEQs=GuiCtrlRead($eq) if $BInserts Or $BSends Or $BEQs = 1 then Send("{F3}") Why isn't it reading? Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted May 3, 2006 Share Posted May 3, 2006 (edited) if GUICtrlRead($send) = 1 or GUICtrlRead($insert) = 1 or Guictrlread($eq) = 1 Then Send("{F3}") EndIf if u just do =1 for the BEQs then its only going to check the BEQs for 1 u got to do the =1 for all Edited May 3, 2006 by thatsgreat2345 Link to comment Share on other sites More sharing options...
Champak Posted May 3, 2006 Author Share Posted May 3, 2006 Thanks to both of you for helping in this part of my script. It's amazing the little things that one misses. 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