twitchyliquid64 Posted April 3, 2011 Share Posted April 3, 2011 (edited) The Aim of this program is to generate an include file which can be used to perform dynamic code execution.When run, this program will wonder your Autoit Documentation and Helpfiles looking up all kinds of information about functions parameters, and syntax.It will then build an Include file for you, in the directory lower down to the Script Directory.This include file will contain functional User Defined Functions as Wrappers to Builtin Autoit Functions.At this point in time, the program will tell you you have 2 build errors (I have one last thing to do before this program is finished), but they are non-fatal and just mean that two functions could not be generated.You can then do Dynamic Execution using the Call() function.TODO:Implement elipsis expression evaluation (...) to make those last two functions generate correctly.You will need both these files:func Build.au3 ^^== Run this one.build_overrides.au3Have fun!Twitchyliquid64. Edited April 13, 2013 by twitchyliquid64 ongoing projects:-firestorm: Largescale P2P Social NetworkCompleted Autoit Programs/Scripts: Variable Pickler | Networked Streaming Audio (in pure autoIT) | firenet p2p web messenger | Proxy Checker | Dynamic Execute() Code Generator | P2P UDF | Graph Theory Proof of Concept - Breadth First search Link to comment Share on other sites More sharing options...
jvanegmond Posted April 4, 2011 Share Posted April 4, 2011 Instead of trying Call("MsgBox", 0, "Title", "Text") which does not work you could have done: Execute("MsgBox(0, ""Title"", ""Text"")") Why not? github.com/jvanegmond Link to comment Share on other sites More sharing options...
twitchyliquid64 Posted April 4, 2011 Author Share Posted April 4, 2011 (edited) Instead of trying Call("MsgBox", 0, "Title", "Text") which does not work you could have done: Execute("MsgBox(0, ""Title"", ""Text"")") Why not? This is the generated function for MsgBox: Func _DynEXEC_MSGBOX( $flag, $title, $text, $timeout=Default, $hwnd=Default) local $ret = MSGBOX($flag,$title,$text,$timeout,$hwnd) SetError(@error,@extended) Return $ret Endfunc You should be calling _DynEXEC_MSGBOX, not MsgBox. I always assumed, based on the info in the Call() helpfile, that dynamic execution is not possible natively in autoit. If what you say about Execute is correct, then I am wrong and a Fool for spending an hour writing this generator. Edited April 4, 2011 by hyperzap ongoing projects:-firestorm: Largescale P2P Social NetworkCompleted Autoit Programs/Scripts: Variable Pickler | Networked Streaming Audio (in pure autoIT) | firenet p2p web messenger | Proxy Checker | Dynamic Execute() Code Generator | P2P UDF | Graph Theory Proof of Concept - Breadth First search Link to comment Share on other sites More sharing options...
jvanegmond Posted April 4, 2011 Share Posted April 4, 2011 The only thing not possible that is dynamic in AutoIt is dynamic includes. github.com/jvanegmond Link to comment Share on other sites More sharing options...
twitchyliquid64 Posted April 4, 2011 Author Share Posted April 4, 2011 Damn. wish i knew that before i wrote this. ongoing projects:-firestorm: Largescale P2P Social NetworkCompleted Autoit Programs/Scripts: Variable Pickler | Networked Streaming Audio (in pure autoIT) | firenet p2p web messenger | Proxy Checker | Dynamic Execute() Code Generator | P2P UDF | Graph Theory Proof of Concept - Breadth First search Link to comment Share on other sites More sharing options...
iShafayet Posted April 4, 2011 Share Posted April 4, 2011 Very interesting approach hyperzap. I wondered about the same thing few months ago. But just like Manadar said, it just ain't gonna work... whoa! I can write! Link to comment Share on other sites More sharing options...
twitchyliquid64 Posted April 7, 2011 Author Share Posted April 7, 2011 Very interesting approach hyperzap. I wondered about the same thing few months ago. But just like Manadar said, it just ain't gonna work...Well, It works, its just not ideal to use my 310 line code to generate 2100 lines of code to do a task that could be done with one line. ongoing projects:-firestorm: Largescale P2P Social NetworkCompleted Autoit Programs/Scripts: Variable Pickler | Networked Streaming Audio (in pure autoIT) | firenet p2p web messenger | Proxy Checker | Dynamic Execute() Code Generator | P2P UDF | Graph Theory Proof of Concept - Breadth First search Link to comment Share on other sites More sharing options...
jvanegmond Posted April 18, 2011 Share Posted April 18, 2011 hyperzap, I've written this Call function which can call any internal function as well: github.com/jvanegmond 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