PantZ4 Posted March 21, 2007 Share Posted March 21, 2007 How to return more than one value? Seems return only can return one value, so how do other functions do it? Example: $MousePos = MouseGetPos() That will make $MousePos to a array and set in the info in the arrays. How to? Thank you Link to comment Share on other sites More sharing options...
sandyd Posted March 21, 2007 Share Posted March 21, 2007 You return an array: $anArray = GetTwoValues() MsgBox(0,'Get Two Values',$anArray[0] & ' - ' & $anArray[1]) Func GetTwoValues() Dim $Result[2] $Result[0] = 'First Value' $Result[1] = 'Second Value' Return $Result EndFunc ----[ SandyD ]--- Link to comment Share on other sites More sharing options...
litlmike Posted March 21, 2007 Share Posted March 21, 2007 How to return more than one value? Seems return only can return one value, so how do other functions do it? Example: $MousePos = MouseGetPos() That will make $MousePos to a array and set in the info in the arrays. How to? Thank you If it is an array, it already returns more than 1 value. It is stored in an array as: $MousePos[0] $MousePos[1] $MousePos[2] $MousePos[3] ... ... ... ... $MousePos[n] _ArrayPermute()_ArrayUnique()Excel.au3 UDF 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