brett Posted May 10, 2004 Posted May 10, 2004 How would i make one function, for example Read(), but make that one find the response in an Instant Message, but if i call the function using Read(Command), it'll send it to the command run function, but if i call the function using Read(Path) It'll do the same actions but send the variable it creates to a different function based on the parameter. Does anybody get this? it seems confusing. -Brett
scriptkitty Posted May 10, 2004 Posted May 10, 2004 UDF do not have optional parts though, so you can't call a function: Read() ; as in blank Read("Command") Read("path") you would have to call it like: Read("") Read("Command") Read("path") hope that wasn't confusing. If a UDF is set up for 3 parameters, you need to use all 3 even if they are blank. $year="2004" three("Hi",$year,"") ; three("Hi",$year); this would error ; three() ; this will error func three($x,$y,$z) ; code endfunc Error would be: Incorrect number of parameters in function call. AutoIt3, the MACGYVER Pocket Knife for computers.
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