Jump to content

Use autoit functions in another application


Derto
 Share

Recommended Posts

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 ?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • Moderators

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.

Link to comment
Share on other sites

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

Link to comment
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
 Share

  • Recently Browsing   0 members

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