Using the .NET Interface

AutoIt X

Using the .NET Interface

A .NET Assembly interface is provided to allow the use of AutoItX DLL functions without the trouble of working with DllImport. The assembly uses .NET 2.0 / CLR 2.0 and is strongly signed for maximum compatibility with your projects.

 

The following files are provided to allow .NET use:

AutoItX3.Assembly.dll - The .NET Assembly for using AutoItX.

AutoItX3.Assembly.xml - The Visual Studio Intellisense help file for the .NET Assembly.

AutoItX3.dll - The main AutoItX DLL (x86)

AutoItX3_x64.dll - The main AutoItX DLL (x64)

 

Using the Assembly from VB/C# within in Visual Studio is very easy:

- Add a reference to AutoItX3.Assembly.dll to your project

- Add a using AutoIt; statement in the files you want to use AutoIt functions

- Write code like this C# example:

    using AutoIt;
    ...

    // Wow, this is C#!
    AutoItX.Run("notepad.exe");
    AutoItX.WinWaitActive("Untitled");
    AutoItX.Send("I'm in notepad");
    IntPtr winHandle = AutoItX.WinGetHandle("Untitled");
    AutoItX.WinKill(winHandle);

- Distribute your final executable with the files AutoItX3.Assembly.dll, AutoItX3.dll, AutoItX3_x64.dll.