Jump to content

How to execute scripts dynamically from VB.Net

Recommended Posts

I'm a newbie to AutoIt, so please excuse if this post is naive, but I'm looking for some guidance or pointers to the appropriate documentation / examples and would appreciate any such help. I am a developer writing Winforms apps in VB.Net, and I want to do some simple automation of IE (filling form fields). I see that the IE.au3 UDF collection has every function I need, and I would like to leverage that. The data that I need to fill the form fields is generated in my VB.Net app, and I would like to seamlessly invoke the appropriate functions in IE.au3 to do the job. My question is: how do I use the AutoItX com object within my program to run a script with UDFs without resorting to compiling a static script and shelling out to the .exe and passing a bunch of command line parameters? It's not imperative that this whole thing runs in-process, but it would be nice. TIA -Steve

Link to post
Share on other sites

That's what I guessed, but thanks to both responders for confirming it. So, I suppose I could dynamically generate a script in my VB code, write it to disk, and then run it (shell-wait out to it) using a command line invocation of AutoIt3. That's a kludge but it may work. Can AutoIt3 run a script coming from the clipboard? Is there a better way to pass a script to AutoIt3 other than writing it to disk? And getting the completion code back? Please let me know if you have any ideas. -Steve

Link to post
Share on other sites

AutoIt cannot run scripts directly from the clipboard. It can run a single line from the command line, but that's it.

I'm not sure what you're trying to accomplish with the dynamic script though... AutoItX cannot run scripts. You'd have to include the full AutoIt executable, in which case you might as well just write and compile a full script.

Edited by wraithdu
Link to post
Share on other sites

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
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...