martytheman Posted July 7, 2014 Share Posted July 7, 2014 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 More sharing options...
KeithABrown Posted July 10, 2014 Share Posted July 10, 2014 (edited) 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 July 10, 2014 by KeithABrown Link to comment Share on other sites More sharing options...
Muzaiyan Posted July 29, 2014 Share Posted July 29, 2014 AutoItX3Lib.AutoItX3 a = new AutoItX3(); a.Run("notepad.exe", @"c:windows"); i think this will be correct remove @ symbol before C:Windows these are working for me in autoit script file Run("notepad.exe",) Run("notepad.exe",@WindowsDir,@SW_SHOW) ShellExecute("notepad.exe","",@WindowsDir) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now