Sign in to follow this  
Followers 0
-TS-

Select, Case, Dofunc1 help

9 posts in this topic

am i setting this up right???

Select
     Case $n1 = "x" and $n2 = "x" and  $n3 = 1
        Dofunc1()
     Case $n1 = "x" and $n2 = "x" and  $n3 = 2
        Dofunc2()    
EndSelect

func1
MsgBox(0, "", "1")
endfunc

func2
MsgBox(0, "", "2")
endfunc

thx

Share this post


Link to post
Share on other sites



OO right on thx Jon :whistle:

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

hmmm still dont work with func1()

Edited by -TS-

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

-TS-,

I believe you have to use a RETURN to close the FUNC properly.

jos

func1

MsgBox(0, "", "1")

return

endfunc

Edited by JdeB

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Select
    Case $n1 = "x" and $n2 = "x" and  $n3 = 1
       func1(); < dont get past here 
    Case $n1 = "x" and $n2 = "x" and  $n3 = 2
      func2()    
EndSelect

func1
MsgBox(0, "", "1")
endfunc

func2
MsgBox(0, "", "2")
endfunc

Edited by -TS-

Share this post


Link to post
Share on other sites

Select
   Case $n1 = "x" AND $n2 = "x" AND $n3 = 1
      func1()
   Case $n1 = "x" AND $n2 = "x" AND $n3 = 2
      func2()    
EndSelect

Func Func1()
    MsgBox(0, "", "1")
EndFunc

Func Func2()
    MsgBox(0, "", "2")
EndFunc

Share this post


Link to post
Share on other sites

Jon is correct.

Share this post


Link to post
Share on other sites

yea that looks right, you need to update the help file :whistle:

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