Sign in to follow this  
Followers 0
hermherm

Run compiled c# on other Pc's

6 posts in this topic

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

Share this post


Link to post
Share on other sites



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


[center]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.[/center]

Share this post


Link to post
Share on other sites

thx :)

So I have to pass the autoitx3.dll to the users, and let it register?

could you give me an example in c#

how to register a .dll (regsvr32 )

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

You must register it before any program what uses it runs.

1. Install and register

2. Run

Share this post


Link to post
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
Sign in to follow this  
Followers 0