Damein Posted December 3, 2015 Share Posted December 3, 2015 Hey, so I'm trying to use I guess a Global Array? Dunno if this is possible but I want to be able to fill the array in one script and then pass it to another with the same values. I think I could do this by first assigning all the values of the array to a string using the ArrayToString and then converting it back but I wanted to first check if there isn't a clean way to just pass an array to an include. Thanks! Most recent sig. I made Quick Launcher W/ Profiles Topic Movie Database Topic & Website | LiveStreamer Pro Website | YouTube Stand-Alone Playlist Manager: Topic | Weather Desktop Widget: Topic | Flash Memory Game: Topic | Volume Control With Mouse / iTunes Hotkeys: Topic | Weather program: Topic | Paws & Tales radio drama podcast mini-player: Topic | Quick Math Calculations: Topic Link to comment Share on other sites More sharing options...
jdelaney Posted December 3, 2015 Share Posted December 3, 2015 (edited) You stated it's an 'include'. I'm assuming that means that one script "#include"'s another.Your included script can contain function, and your driving script that includes it can call the function, and pass the array as a parameter to it.; script one... #include "Script2.au3" Local $a[5]=[1,2,3,4,5] Script2Func($a) ; script two...named script2.au3 Func Script2Func($aCallersData) For $i = 0 To UBound($aCallersData)-1 ConsoleWrite($aCallersData[$i] & @CRLF) Next EndFunc Edited December 3, 2015 by jdelaney IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window. Link to comment Share on other sites More sharing options...
Damein Posted December 3, 2015 Author Share Posted December 3, 2015 That'll do just fine I saw the ByRef earlier in my searches but didn't know if it would be the cleanest way or not. Thanks! Most recent sig. I made Quick Launcher W/ Profiles Topic Movie Database Topic & Website | LiveStreamer Pro Website | YouTube Stand-Alone Playlist Manager: Topic | Weather Desktop Widget: Topic | Flash Memory Game: Topic | Volume Control With Mouse / iTunes Hotkeys: Topic | Weather program: Topic | Paws & Tales radio drama podcast mini-player: Topic | Quick Math Calculations: Topic Link to comment Share on other sites More sharing options...
jdelaney Posted December 3, 2015 Share Posted December 3, 2015 Depends if you function does heavy lifting with modifying the array or not. I suppose to be the most efficient you would use byref...if your arrays are super small, then it won't matter. IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window. 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