mike1212 Posted March 6, 2005 Share Posted March 6, 2005 (edited) Hi Can someone tell me how to get this to statement to work? :"> elseif $action = 4 then ; 1/2 ControlClick($name, "", $Button); elseif $action = 4 then ; 1/2 ControlClick($name, "", $Button); This is in a While Wnd loop. I belive a loop reads from top to bottom of the whole loop, so I guess whats happening is when the first elseif is read it must stop, and not continue to the next elseif. I need a way to make it read the second elseif as well as the first. Thank You mike Edited March 7, 2005 by mike1212 Link to comment Share on other sites More sharing options...
MHz Posted March 6, 2005 Share Posted March 6, 2005 Why do you not put the 2 ControlClicks with the 1st ElseIf, as when $action = 4 is true, you want them both processed? The 1st true If statement is processed. Link to comment Share on other sites More sharing options...
mike1212 Posted March 6, 2005 Author Share Posted March 6, 2005 Why do you not put the 2 ControlClicks with the 1st ElseIf, as when $action = 4 is true, you want them both processed?The 1st true If statement is processed.<{POST_SNAPBACK}>Hi MHZI tried that using the {} braces and cant seem to get it to work.It looks like it bypasses it and only reads the second elseif then.Unless, I am not formating the statement correctly. An example of the format would be of great help.Thank You Mike Link to comment Share on other sites More sharing options...
phillip123adams Posted March 6, 2005 Share Posted March 6, 2005 Hielseif $action = 4 then; 1/2ControlClick($name, "", $Button);elseif $action = 4 then; 1/2ControlClick($name, "", $Button);I need a way to make it read the second elseif as well as the first.<{POST_SNAPBACK}>When a true condition is detected, the IF statement performs only that section of the statement and skips the rest of IF statement.I think you want consecutive IF statements as follows (although I am no sure since both of your elseif's are the same):If $action = 4 then ControlClick($name, "", $Button4); EndIf If $action = 5 then ControlClick($name, "", $Button5); EndifOr do you want to do more than one thing when a condition is true:If $action = 4 then ControlClick($name, "", $Button4); ControlClick($name, "", $Button?); EndIf Phillip Link to comment Share on other sites More sharing options...
mike1212 Posted March 6, 2005 Author Share Posted March 6, 2005 (edited) When a true condition is detected, the IF statement performs only that section of the statement and skips the rest of IF statement.I think you want consecutive IF statements as follows (although I am no sure since both of your elseif's are the same):If $action = 4 then ControlClick($name, "", $Button4); EndIf If $action = 5 then ControlClick($name, "", $Button5); EndifOr do you want to do more than one thing when a condition is true:If $action = 4 then ControlClick($name, "", $Button4); ControlClick($name, "", $Button?); EndIf<{POST_SNAPBACK}>Hi phillipYes I want to do more than one thing when a condition is true.You statedOr do you want to do more than one thing when a condition is true:CODEIf $action = 4 then ControlClick($name, "", $Button4); ControlClick($name, "", $Button?);EndIfSo I added thiselseif $action = 4 then ControlClick($Tablename, "", $RaiseButton); ControlClick($Tablename, "", $CallButton?);An error come up stating ControlClick($Tablename, "",CallButton?); ControlClick($Tablename, "",CallButton^Error Error unable to parse line :xWhat I what, is to add this, to it some how?ControlClick($tablename, "", $CallButton);So the command will then click the bet or raise button followed by a call control click.What is happing is it works fine, except if someone else should cap the bet then the two options that come back to me are 1. call 2. foldand the above commad does not no what to do in this case. Thank You Mike Edited March 7, 2005 by mike1212 Link to comment Share on other sites More sharing options...
phillip123adams Posted March 6, 2005 Share Posted March 6, 2005 Yes I want to do more than one thing when a condition is true.ControlClick($Tablename, "", $RaiseButton);ControlClick($Tablename, "", $CallButton?);ControlClick($Tablename, "",CallButton^ErrorError unable to parse line<{POST_SNAPBACK}>You have the right idea. If you remove the Question Mark, does it work (assuming the ControlID is $CallButton)? Phillip Link to comment Share on other sites More sharing options...
mike1212 Posted March 6, 2005 Author Share Posted March 6, 2005 Hi Phillip Good catch with the ? mark. I dont know how that got in there, but I removed it, and the script loaded fine. I will try it later and get back to you. Thank You for now Mike Link to comment Share on other sites More sharing options...
mike1212 Posted March 7, 2005 Author Share Posted March 7, 2005 (edited) Thank You Phillip & MHz The program works fine now. Again thank you both for your support. I am limited on my skills in this program , however as I progress, I too will give advice. Til then, I need to learn as You folks have . Thank You mike Edited March 7, 2005 by mike1212 Link to comment Share on other sites More sharing options...
phillip123adams Posted March 7, 2005 Share Posted March 7, 2005 I am limited on my skills in this program , however as I progress,<{POST_SNAPBACK}>That's the spirit!I'm replying to you other post right now. Watch for it. Phillip 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