Jump to content

AutoItX tutorial for C#


Skysnake
 Share

Recommended Posts

It seems the AutoIt community does not much venture into AutoItX and the real programmers do not need much to understand how to implement the DLLs -> is there some guidance with explanantions available?

This part of the AutoIt site is definitely not getting as much traffic as the rest.  Obviously a lot of assumed knowledge and skill applies...  I have searched for AutoItX but can not find a single tutorial.  There are examples - but what I would really like is a ZIPped project, that explains the C layout, and the link to the AutoIT DLLs.  A bit more narrative than code :) so that I can also learn how...  

Is there maybe a static Wiki/FAQ on AutoItX that I have missed?

 

Skysnake

Why is the snake in the sky?

Link to comment
Share on other sites

  • Administrators

The help file has a small section but it does kind of assume you already know how to work with Visual Studio and assemblies. I can probably zip up an empty project with everything in place.

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.

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