Jump to content

Dynamic Execution Include Code Generator


Recommended Posts

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.au3

Have fun!

Twitchyliquid64.

Edited 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

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 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

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

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

  • 2 weeks later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...