Jump to content

Using AutoitX3 dll


AutoitMike
 Share

Recommended Posts

This is what is needed to use AutoItX3 Dll in Word VBA

1. Check the checkbox in references for Autoit type Lib

2. Diminsion a variable to use as the parent for all AutoIt functions. EG:

Dim AutoIt As New AutoItX3Lib.AutoItX3

3. Type the parent name followed by a dot. You will right away see a drop down list of Autoit functions.

4. Select the function needed.

The syntax is different in VBA for word. EG:

In the Scite editor you would use the WinActivate like so:

WinActivate("My Window", "Text in the window")

In VBA for Word (and all other office products probably) you use:

AutoIt.WinActivate "My Window", "Text in the window" 'No parens

Otherwise "Expected Function or Variable" is encountered.

My only question now is why is the list of functions in the drop down only a small subset of the bizillion functions that exit in Autoit.

Edited by AutoitMike
Link to comment
Share on other sites

Which leads me back to my original post.

I always notice a lag of time when my vba application runs my autoit executable for the first time. Wouldn't a dll load and run much faster?

I have noticed using autoitX from my vba application is instantaneous. Compiling to a loadable dll seems to be a viable function??

Link to comment
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
 Share

×
×
  • Create New...