Sign in to follow this  
Followers 0
stev379

multiple tabs

7 posts in this topic

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



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

If Then

ElseIf

ElseIf

EndIf

<{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

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 :lmao: 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

#5 ·  Posted (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 :lmao: 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
Endif

Could 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
EndSelect

Combining AND/OR/NOT can be acomplished

If $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 by Blue_Drache

Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

Share this post


Link to post
Share on other sites

cool, I'll test when I get back to my desk.

tks!

Share this post


Link to post
Share on other sites

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.

:lmao:

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0