Jump to content

Basic script Issue - Program not Showing ( .Net dll )


Recommended Posts

Hi - I think your Documentation is outdated?

I have been reading the help file "Using the .NET Interface"

I can't get anything like what is there to work.

the closest I can get is to reference AutoItX3.dll

Then I try the C# code..

            AutoItX3Lib.AutoItX3 a = new AutoItX3();
            a.Run("notepad.exe", @"c:windows");
 
It appears to run notepad but it isn't visible - it just creates a process.
 
I am using a 64 bit machine - even if I register and reference the 64 bit dll - it does the same.
 
Ideas? 
 
Link to comment
Share on other sites

Hi, I am a new user of AutoIt  (Just started today) and this code worked just fine for me.  I am using it inside of a plugin for Autocad.  Thus the commandmethod attribute.

You need to reference AutoItX3.Assembly.dll and not the AutoItX3.dll. There is no need to register any dll.   If you distribute your application then you need to make sure to distribute AutoItX3.Assembly.dll, AutoItX3.dll, and AutoItX3_x64.dll as well.

using Autodesk.AutoCAD.Runtime;
using AutoIt;

namespace Brow.MepUtilities

public Class TestCommands
{
    [CommandMethod("Notepad")]
    public static void Notepad()
    {
        AutoItX.Run("Notepad.exe", @"C:\Windows");
    }
}
Edited by KeithABrown
Link to comment
Share on other sites

  • 3 weeks later...

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...