stev379 0 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 Share this post Link to post Share on other sites
Andre 0 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! Share this post Link to post Share on other sites
Blue_Drache 260 Posted February 17, 2005 If ThenElseIfElseIfEndIf<{POST_SNAPBACK}>ElseIf also requires a Then Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache Share this post Link to post Share on other sites
stev379 0 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 Share this post Link to post Share on other sites
Blue_Drache 260 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 Share this post Link to post Share on other sites
stev379 0 Posted February 17, 2005 cool, I'll test when I get back to my desk. tks! Share this post Link to post Share on other sites
MHz 80 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. Share this post Link to post Share on other sites