stev379 Posted February 17, 2005 Share Posted February 17, 2005 Created a GUI and a with the first 2 tabs, it works fine. Not so much with 3 tabs. How should the statement below be formated to get to the 3 tab? Obviously, there are too many else statements. While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Or $msg = $button_Cancel Exit Case Else If GUICtrlRead($tab) = 0 Then _DrvMap($msg) Else _PWReset($msg) Else _JoinDM($msg) EndIf EndSelect Wend Link to comment Share on other sites More sharing options...
Andre Posted February 17, 2005 Share Posted February 17, 2005 If Then ElseIf ElseIf EndIf What about Windows without using AutoIt ?It would be the same as driving a car without an steering Wheel! Link to comment Share on other sites More sharing options...
Blue_Drache Posted February 17, 2005 Share Posted February 17, 2005 If ThenElseIfElseIfEndIf<{POST_SNAPBACK}>ElseIf also requires a Then Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache Link to comment Share on other sites More sharing options...
stev379 Posted February 17, 2005 Author Share Posted February 17, 2005 elseif is what I though too. But as BlueD said, it reguires a then. Here is where I get stuck. What's the then? If this is my first part of the "IF" statement, then what would I use in place of the "0" for the elseif's? huh? Would it be "1" and "2"? If it's that easy, I need to reboot my brain. Can anyone confirm if this is the case? I'm at a Mac for a few hours and I'm curious about this. If GUICtrlRead($tab) = 0 Then Link to comment Share on other sites More sharing options...
Blue_Drache Posted February 17, 2005 Share Posted February 17, 2005 (edited) elseif is what I though too. But as BlueD said, it reguires a then. Here is where I get stuck. What's the then? If this is my first part of the "IF" statement, then what would I use in place of the "0" for the elseif's? huh? Would it be "1" and "2"? If it's that easy, I need to reboot my brain.Can anyone confirm if this is the case? I'm at a Mac for a few hours and I'm curious about this.If GUICtrlRead($tab) = 0 Then<{POST_SNAPBACK}>If $x = $y then ; do this ElseIf $x > $y then ; do that Else ; do something else EndifCould also use Select/Case if you're more familiar with that.Select Case $x = $y ; do this Case $x > $y ; do that Case Else ; do something else EndSelectCombining AND/OR/NOT can be acomplishedIf $x = $y AND $y > $z then; only true if both statements are true ; do this ElseIf $x > $y OR $y < $z then; true if ONE of the two statements are true ; do that ElseIf Not $x < $y then; same as writing ElseIf $x > $y ; do a third thing Else ; do whatever doesn't fit the above statements EndIf Edited February 17, 2005 by Blue_Drache Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache Link to comment Share on other sites More sharing options...
stev379 Posted February 17, 2005 Author Share Posted February 17, 2005 cool, I'll test when I get back to my desk. tks! Link to comment Share on other sites More sharing options...
MHz Posted February 17, 2005 Share Posted February 17, 2005 When you use Scite4Autoit3, you get self expanding abbreviations, that can help you with these multiline functions.Look here to see the listing. Notice the multiline functions displayed. The typed red words can expand by simply pressing the spacebar, after the abbreviation.If your not a Scite4Autoit3 user, then ignore what I say. But the webpage might be a good reference anyway. 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