paz Posted July 18, 2007 Share Posted July 18, 2007 Hi there,I searched a lot in the help file / a bit on the forum, and I wonder if it can be done...Is there any ways of getting a list of the defined functions of a script at runtime?Take this bogus script as an example:$func_list = GetMyFuncs() Func Fubar($p1, $p2) (...)EndFuncOf course, GetMyFuncs() doesn't exist - but is there any UDF able to do in sort that $func_list would contain something like "Fubar($p1, $p2)"Thanks! Link to comment Share on other sites More sharing options...
Developers Jos Posted July 18, 2007 Developers Share Posted July 18, 2007 Hi there,I searched a lot in the help file / a bit on the forum, and I wonder if it can be done...Is there any ways of getting a list of the defined functions of a script at runtime?Take this bogus script as an example:$func_list = GetMyFuncs() Func Fubar($p1, $p2) (...)EndFuncOf course, GetMyFuncs() doesn't exist - but is there any UDF able to do in sort that $func_list would contain something like "Fubar($p1, $p2)"Thanks!I am lost why this would be useful but I am sure you can tell us .. SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
DW1 Posted July 18, 2007 Share Posted July 18, 2007 I would assume this is possible pre compile only AutoIt3 Online Help Link to comment Share on other sites More sharing options...
paz Posted July 18, 2007 Author Share Posted July 18, 2007 What would be the use - he he he, I was a bit expecting this ;-) I'm totally aware that this kind of functionnality would not be used to a great extend... but I can explain what is my own goal. See, I start using AutoIT more and more theses days, mostly to build Oracle utilities, to perform very specific queries and do a lot of reporting directly in Excel. I use a script of my creation to convert SQL code into AU3 files, so I can "embed" SQL queries in my AutoIT executables. In my case, theses AutoIT functions all start with the "SQL_" prefix. As a "recovery" option, I'd like to be able to "dump" the embedded SQL code back to text files. What I have in mind is to have my executables respond to a secret command-line option... So the executable can build a list of it's internal functions, and "call" all the ones starting with "SQL_" to write the SQL queries back to text files. If I could write a single function doing that, without having to hardcode the actual "SQL_" functions to retreive in each utilities, that would be great :-) I'm just asking - I certainly can live without this... but I might think of other uses 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