Jump to content
Sign in to follow this  
-TS-

Select, Case, Dofunc1 help

Recommended Posts

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

-TS-,

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

jos

func1

MsgBox(0, "", "1")

return

endfunc

Edited by JdeB

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

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

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...