Sign in to follow this  
Followers 0
Komerad

Could use a little help setting me on the tracks.

4 posts in this topic

I have used autoit as is in the past, I'm now learning c++ (codeblocks+wxwidgets)

I'm trying to write a simple guildwars bot to send chat messages (Basicly googling for that brought me to autoitX)

I am able to recognise & send all characters in a string correctly to any window that has an active cursor..

Now I can't seem to get guildwars to accept a simple "ENTER" even with various methods i tried.

As there are autoit scripts for guildwars this seems my last resort..

On a website i found some info on how to get going with autoitx for devc++, i kina adapted it for codeblocks and it apears to work just fine.

The same website stated that autoitX commands from an IDE = Autoit commands but with AU3_ prefix.

So I did..

Now

A simple test :

AU3_Sleep(1000);

works fine, so far the info was helpfull

however :

AU3_Send("{ENTER}");

results in :

error: cannot convert `const char*' to `const WCHAR*' for argument `1' to `void AU3_Send(const WCHAR*, long int)'|

What did I miss? Pls some guidance...

Would be very appreciated.

Regards

Share this post


Link to post
Share on other sites



Either call it like that:

AU3_Send(L"{ENTER}"); // L prefix is there for unicode literal strings.

or use:

//....
#include <tchar.h>

#ifndef UNICODE
#define UNICODE
#endif

AU3_Send(_T("{ENTER}"));

Share this post


Link to post
Share on other sites

Thx, your first method works like a charm

AU3_Send(L"{ENTER}",0);

Could you please explain what the L stands for and whats the second parameter does?

Thx

Share this post


Link to post
Share on other sites

Oops sorry know now what the L stands for..

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