Jump to content

Recommended Posts

Posted

Heya...

I compiled my c# programm with AutoIt

using AutoItX3Lib; // for autoit
..
..
..
private static AutoItX3Lib.AutoItX3Class autoit = new AutoItX3Lib.AutoItX3Class();
public static void Init()
{
autoit.AutoItSetOption("CaretCoordMode", 0);
autoit.AutoItSetOption("ColorMode", 1);
autoit.AutoItSetOption("MouseCoordMode", 0);
autoit.AutoItSetOption("PixelCoordMode", 0);
}

void auto()
{
    autoit.MouseMove(x11, y11,0);
        autoit.Sleep(400);
        autoit.MouseMove(x22, y11,30);
        autoit.MouseMove(x22, y22,30);
        autoit.MouseMove(x11, y22,30);
        autoit.MouseMove(x11, y11,30);  
}

It's working okay on my machine, and I registered as Referenz my "AutoItX3Lib".

So wonderful :) mousemove is working like a charm on my computer... and on all computers which got AutoIt installed...

but if I send it to a Friend.. who hasn't got autoit... my c# programm simply fails and produce errors...

So how can I get my c# programm working on a computer which hasn't got AutoIt installed???

  • Moderators
Posted

Did you happen to include the AutoItX3.dll to your friend and install it properly?

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Posted

Okay I found a way:

string loadpath = Application.StartupPath + "\\";   
        
Process proc1 = new Process();

proc1.StartInfo.FileName ="regsvr32.exe";

proc1.StartInfo.WindowStyle = ProcessWindowStyle.Maximized;

string argument =   loadpath +"AutoItX3.dll";

            proc1.StartInfo.Arguments = argument;
            proc1.Start();

But I always receive an error

Load library failed, module could not be found :)

I packed my reg.exe (with the code) and the AutoItX3.dll into the same folder and executed my programm

Posted

okay I think it's following problem...

if someone hasn't got autoit installed...

and you're using c# using AutoItx.dll...

and register .dll in the same programm it crashes OO

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
  • Recently Browsing   0 members

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