-TS- Posted December 7, 2003 Share Posted December 7, 2003 whats the func command setup?with the goto command i would be long done and already had it posted on my site by now, but im stuck asking questions *TS* Link to comment Share on other sites More sharing options...
CyberSlug Posted December 7, 2003 Share Posted December 7, 2003 (edited) Func functioname([byRef] $param1, [byRef] $paramN) ; code goes here [Return x] EndFunc expandcollapse popup; ; *** AN EXAMPLE SCRIPT TO DEMONSTRATE FUNCTIONS *** beginningThing() $var = 7 MsgBox(0,"VAR equals", $var) Decrement($var) MsgBox(0,"After decrement, var now equals", $var) MsgBox(0,"VAR tripled is", triple($var)) MsgBox(0,"but VAR still equals", $var) theEnd("Done", "That's all folks") Exit ; Example of function Func triple ($num) Return $num * 3 EndFunc ; Example of ByRef Func Decrement (ByRef $x) $x = $x - 1 Return $x EndFunc ; Example of no return value and also multiple parameters Func theEnd ($title, $text) MsgBox(0,$title, $text) EndFunc ; Example of no return value or parameters Func beginningThing() MsgBox(0,"","Examples of Functions") EndFunc Edited December 7, 2003 by CyberSlug Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Link to comment Share on other sites More sharing options...
webluxor Posted March 3, 2009 Share Posted March 3, 2009 ohh..its a very complicated functon..thanks ... its useful for me Webluxor.com web luxor (860)-865-0246 Link to comment Share on other sites More sharing options...
weaponx Posted March 3, 2009 Share Posted March 3, 2009 ohh..its a very complicated functon..thanks ... its useful for me Webluxor.com web luxor (860)-865-0246 Whats complicated? $result = Multiply(2,3) MsgBox(0,"",$result);Shows 6 Func Multiply($num1, $num2) Return $num1 * $num2 EndFunc 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