Jump to content

help with first autoitX in dev C++


syko
 Share

Recommended Posts

I am trying to use autoitX in dev C++ I have Autoit3.h and AutoItX3.dll in the directory and here is my code

// Empty project additions:
//      Added "AutoIt3.h" include
//      Added "AutoItX3.lib" to the input linker libraries
//
// AutoItX3.dll needs to be in the run path during execution

#include <Windows.h>
#include <tchar.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(_T("notepad.exe"), _T(""), 1);
    AU3_WinWaitActive(_T("Untitled -"), _T(""), 0);
    AU3_Send(_T("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;
}

now here are errors:

[Linker error] undefined reference to `AU3_Sleep@4' 
  [Linker error] undefined reference to `AU3_Run@12' 
  [Linker error] undefined reference to `AU3_WinWaitActive@12' 
  [Linker error] undefined reference to `AU3_Send@8' 
  ld returned 1 exit status
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...