Jump to content
Sign in to follow this  
-TS-

Select, Case, Dofunc1 help

Recommended Posts

-TS-

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-

hmmm still dont work with func1()

Edited by -TS-

Share this post


Link to post
Share on other sites
Jos

-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                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
-TS-

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
Jon

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

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.