Jump to content
Sign in to follow this  

Get AutoitX to work!

Problems with autoitX and C++?  

4 members have voted

  1. 1. Have you had problems getting autoitX to work with C++?

    • Yes, It fails to work everytime!
    • Yes, with lossing some hair and drinking 5 cups of coffee every night.
    • No, I knew how because I am a great C++ programer and like to laugh at people that can
    • No, you are just Imagining things.
  2. 2. Do you think that the AutoitX help docs (if there is any) are helpful?

    • No, They need to be writen better.
    • What help docs? There are some?
    • What help docs? In my day we had to read the code they gave us!
    • Yes, I am a mod, developer, or "one of them" that knows this info anyway and thinks that sniper120 is a n00b and should go a die in a hole :)
    • I didn't use them :)
  3. 3. Do you think that the autoit Win_API functions should be included in X to enable people to draw other/in games?

    • Yes, Who was the bone head that didn't put them in?
    • No, In my day I just used the D3D & DirectX functions that "work with all C++ compilers and n00bs are able to setup" :)

Recommended Posts


Every time I load Dev-C++ up I think: Hey maybe I could do that with autoit. It would be so much easier. But on the other hand I need to use C++ for this project... AutoitX was intended to place the simplicity of autoit in C++. However with a great, helpful documentation (It's the opposite) this makes it hard to: A, to get AutoitX working in the first place. There is no TuT to get it up and running... I have to use my somewhat limited C++ knowledge to get it running. B, get the supported autoitX functions to compile and work (if I can get them to work). This is a long problem, I used(or attempted to use?) an old version of X with Dev-C++. This failed... :( Anyway the present. This C++ code below does not compile because of an error with the X function...

/* Replace "dll.h" with the name of your header */
#include "dll.h"
#include <windows.h>
#include "Autoit3.h"
#pragma comment(lib, "libautoitx3.a")
/* Thanks to the smart person
     who wrote the docs, 
     I had to find this after 4 days ^



DllClass::~DllClass ()


BOOL APIENTRY DllMain (HINSTANCE hInst     /* Libraryinstance handle. */ ,
                      DWORD reason        /* Reason this functionis being called. */ ,
                      LPVOID reserved     /* Not used. */ )
    switch (reason)
        // ERROR HERE ^^^




    /* Returns TRUE on success, FALSE on failure */
    return TRUE;

The compiler returns:

In function `BOOL DllMain(HINSTANCE__*, DWORD, void*)':

cannot convert `const char*' to `const WCHAR*' for argument `1' to `long intAU3_CDTray(const WCHAR*, const WCHAR*)'

[build Error] [dllmain.o] Error 1

As far as I can tell... nothing. With my limited knowledge, I can't get it. But, I know I am calling the function with another type of text string and it can't do the conversion? I am using the autoit (not X) help file to help me do the parameters.

Thanks for the help! >_<

Edited by sniper120

Share this post

Link to post
Share on other sites
Richard Robertson

You don't seem to understand what AutoItX is. First go learn that, and then come back. AutoItX does have some flaws but not the "flaws" you outline here.

The documentation is also just fine.

AutoItX will never contain WinApi calls because you call AutoItX exactly the same as WinApi.

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