lupusbalo Posted February 5, 2005 Share Posted February 5, 2005 It seems that a function cannot be parameter of another function(actually I didn't find anything about it in the help file or Forum)Could be useful to (e.g.): browse a directory and apply a function to each file in it, or pass comparison function to a sort etc...a sort of CallBack mecanism something to use like: BrowseAndApply($Dir,$BrowseSubfolderYesNo,$fileMask,$Funtion_to_apply) As it doesn't work directly (ERROR PARSING...), I tried different things using say: $func="somefunctionname"; also tried $somefunctionname Func BrowseAndApply(.....$func) ...... Eval("$func(...properparameters...)") without any success. ... EndFunc) anybody has idea?? Link to comment Share on other sites More sharing options...
CyberSlug Posted February 5, 2005 Share Posted February 5, 2005 You can use Call.... however, you need to use global variables because Call does not take parameters....By the way: When you use Eval on variables, you do not include the $ symbol. Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Link to comment Share on other sites More sharing options...
lupusbalo Posted February 6, 2005 Author Share Posted February 6, 2005 You can use Call.... however, you need to use global variables because Call does not take parameters....THX for quick answer.actually i'am a bit reluctant to use Global variables to do that - it's a bit more complicated, (just need not to be too sleepy ) - I'd bad experiences with "side-effect" (we all had isn't it?? )But if it's the only way, i'll do my best & try to manage !!!your second point: i'am aware of that, in my post it was just "real pseudo real code" , and it was late!! 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