Jump to content
Sign in to follow this  
karlkar

Out parameter

Recommended Posts

karlkar

Hello.

Is it possible for Autoit to pass a parameter that will be modified in function and then the changes from function will be visible out of function body?

Example:

Local $x = 1
Local $y = 2
change($x, $y)


Func change($x, $y)
   $x = 5
   $y = 17
EndFunc

MsgBox(8192, $x, $y)

I'd like it to open window with title "5" and message "17". Is it possible somehow? Returning the values is not very good for my situation...

In C you can pass a pointer, in C# you can add "out" keyboard. Does something like this exist in Autoit?

Edited by karlkar

Share this post


Link to post
Share on other sites
orbs

look up ByRef in AutoIt help.

  • Like 1

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  

×