Jump to content
Sign in to follow this  

Changing Function's Actions

Recommended Posts

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.


Share this post

Link to post
Share on other sites

UDF do not have optional parts though, so you can't call a function:

Read() ; as in blank



you would have to call it like:




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.

; three("Hi",$year); this would error
; three() ; this will error

func three($x,$y,$z)
; code

Error would be: Incorrect number of parameters in function call.

AutoIt3, the MACGYVER Pocket Knife for computers.

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