aommaster Posted May 31, 2008 Share Posted May 31, 2008 Hey guys! I'm trying to call a function which has an array as a parameter. Is there a way of calling it, and supplying the parameter by using GUICTRLSetOnEvent? My program looks something like this: Event1: filelistarray= call function f1 function f1: Get a file list, and add to array. then, return a value array1 Event2: call function f2 and supply filelistarray Is there a way of doing it? Thanks guys! Link to comment Share on other sites More sharing options...
BrettF Posted May 31, 2008 Share Posted May 31, 2008 I think what you want is... GUICtrlSetOnEvent ($control, "func1") Func func1 () $fillist = _FileListToArray ("file") func2 ($fillist) EndFunc Func ($list) For $I = 1 to UBound $list ConsoleWrite (@CRLF & $list[$I]) Next EndFunc Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
aommaster Posted May 31, 2008 Author Share Posted May 31, 2008 Hi Bert! Thank you very much for your reply. However, the function that needs to have the array is not executed right after the array has been made (nor automatically). So, the array will need to 'wait' in memory until all the other parameters are set (these will affect how the final function will behave through global variables, and what-not). Any ideas? Link to comment Share on other sites More sharing options...
BrettF Posted May 31, 2008 Share Posted May 31, 2008 http://www.autoitscript.com/forum/index.php?showtopic=71811 shall probably help Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
aommaster Posted May 31, 2008 Author Share Posted May 31, 2008 Oh... I was afraid you'd point to that thread I thought there would be an easier way of doing it. Thanks Bert! 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