Sign in to follow this  
Followers 0
SwingDancer

How to execute scripts dynamically from VB.Net

5 posts in this topic

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

Share this post


Link to post
Share on other sites



You can't. AutoItX has limited canned functionality, and one limitation is that it cannot leverage UDFs.

Share this post


Link to post
Share on other sites

Correction: AutoItX does not execute any script code. Never has and never will.

Share this post


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

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

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

Share this post


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
Sign in to follow this  
Followers 0