SjaakTV Posted March 11, 2010 Share Posted March 11, 2010 Hi, So i made like 8 function. Lets call them 1 till 8. When i press start function 1 will begin. When it ends i want that function 2 starts and so on. How do i do that? Thnx for your time. Link to comment Share on other sites More sharing options...
Hawkwing Posted March 11, 2010 Share Posted March 11, 2010 If you want it to work like that, what's the point of having functions? The Wheel of Time turns, and Ages come and pass, leaving memories that become legend. Legend fades to myth, and even myth is long forgotten when the Age that gave it birth comes again. Link to comment Share on other sites More sharing options...
Pain Posted March 11, 2010 Share Posted March 11, 2010 (edited) Like this? Even though it makes no sense. test1() Func test1() MsgBox(0, "", "hello from test1") test2() EndFunc Func test2() MsgBox(0, "", "hello from test2") test3() EndFunc Func test3() MsgBox(0, "", "hello from test3") test4() EndFunc Func test4() MsgBox(0, "", "hello from test4") EndFunc Edited March 11, 2010 by Pain Link to comment Share on other sites More sharing options...
SjaakTV Posted March 11, 2010 Author Share Posted March 11, 2010 thnx pain. Hawkwing functions have 2/3 anwsers. So every anwser has a other function to start. Link to comment Share on other sites More sharing options...
Mobius Posted March 11, 2010 Share Posted March 11, 2010 You could also do something like this. CONST $NUMFUNCS = 4 ; FOR $i = 0 TO $NUMFUNCS ConsoleWrite("RETURNS: "& Call("_F"& $i,"Function: "& $i) & @LF) NEXT EXIT ; FUNC _F0($N) ConsoleWrite($N & @LF) RETURN 0 ENDFUNC ; FUNC _F1($N) ConsoleWrite($N & @LF) RETURN 1 ENDFUNC ; FUNC _F2($N) ConsoleWrite($N & @LF) RETURN 2 ENDFUNC ; FUNC _F3($N) ConsoleWrite($N & @LF) RETURN 3 ENDFUNC ; FUNC _F4($N) ConsoleWrite($N & @LF) RETURN 4 ENDFUNC ; Link to comment Share on other sites More sharing options...
Hawkwing Posted March 11, 2010 Share Posted March 11, 2010 thnx pain.Hawkwing functions have 2/3 anwsers. So every anwser has a other function to start.Is English your native language? Your reply didn't make much sense. If you want to do something like Pain's example, why would you not just have the four msgboxes without putting them in funcs? I don't see any reason whatsoever to have 8 funcs set up so that the first would call the second, then the second would call the third, etc. The Wheel of Time turns, and Ages come and pass, leaving memories that become legend. Legend fades to myth, and even myth is long forgotten when the Age that gave it birth comes again. Link to comment Share on other sites More sharing options...
Developers Jos Posted March 11, 2010 Developers Share Posted March 11, 2010 Looking at the membername my guess would be Dutch ... toch ? Jos 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. Link to comment Share on other sites More sharing options...
PartyPooper Posted March 11, 2010 Share Posted March 11, 2010 Is English your native language? Your reply didn't make much sense. If you want to do something like Pain's example, why would you not just have the four msgboxes without putting them in funcs? I don't see any reason whatsoever to have 8 funcs set up so that the first would call the second, then the second would call the third, etc.I guess that would depend on whether he always wanted to chain to the next function inline or whether he wanted to chain to another function based on the answer given in that function ie. if input = yes goto function x or if input = no, goto function y. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now