Jump to content

Out parameter


karlkar
 Share

Go to solution Solved by orbs,

Recommended Posts

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
Link to comment
Share on other sites

  • Solution

look up ByRef in AutoIt help.

Signature - my forum contributions:

Spoiler

UDF:

LFN - support for long file names (over 260 characters)

InputImpose - impose valid characters in an input control

TimeConvert - convert UTC to/from local time and/or reformat the string representation

AMF - accept multiple files from Windows Explorer context menu

DateDuration -  literal description of the difference between given dates

Apps:

Touch - set the "modified" timestamp of a file to current time

Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes

SPDiff - Single-Pane Text Diff

 

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...