Jump to content
Sign in to follow this  
Derto

Use autoit functions in another application

Recommended Posts

Derto

Hi.

I would like to use an Autoit function (PixelGetColor) in my Windows application C project, is it possible ?

It would be great if someone could give me an exemple =) ty

btw, Does anyone know how i can see how is made this function ?

Share this post


Link to post
Share on other sites
Andreik

Hi.

I would like to use an Autoit function (PixelGetColor) in my Windows application C project, is it possible ?

It would be great if someone could give me an exemple =) ty

btw, Does anyone know how i can see how is made this function ?

I think AutoItX is the answer. Or you can make an exe and run from command line.


When the words fail... music speaks

Share this post


Link to post
Share on other sites
SmOke_N

I think AutoItX is the answer. Or you can make an exe and run from command line.

Have a look at AutoitX. Its standardly installed and comes with examples.

Jos

I'd like to see an example of using AutoItX.dll with a C app.


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.

Share this post


Link to post
Share on other sites
Derto

Hey, ty for fast answer =)

but i have some problemes :<

I tried to run the exemple given for a C/c++ app

#include <Windows.h>
#include "AutoIt3.h"

int APIENTRY WinMain(HINSTANCE hInstance,
                     HINSTANCE hPrevInstance,
                     LPSTR   lpCmdLine,
                     int       nCmdShow)
{
    // You can now call AutoIt commands, e.g. to send the keystrokes "hello"
    AU3_Sleep(1000);
    AU3_Run("notepad.exe", "", 1);
    AU3_WinWaitActive("Untitled -", "", 0);
    AU3_Send("Hello{!}", 0);

    // Get the text in the status bar
    //char szText[1000];
    //AU3_StatusbarGetText("Untitled -", "", 2, szText, 1000);
    //MessageBox(NULL, szText, "Text:", MB_OK);

    return 0;
}

But i get this error everytime [Linker error] undefined reference to `AU3_Sleep@4'

i'm using Dev C++ and i linked the library

Share this post


Link to post
Share on other sites
Derto

ok i figure it out, I had to linked the .a instead of the .lib :)

One more question, is there any way to to run the .exe alone without the .dll ?

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  

×