Komerad Posted May 19, 2009 Share Posted May 19, 2009 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 Link to comment Share on other sites More sharing options...
Authenticity Posted May 19, 2009 Share Posted May 19, 2009 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}")); Link to comment Share on other sites More sharing options...
Komerad Posted May 19, 2009 Author Share Posted May 19, 2009 Thx, your first method works like a charmAU3_Send(L"{ENTER}",0);Could you please explain what the L stands for and whats the second parameter does?Thx Link to comment Share on other sites More sharing options...
Komerad Posted May 19, 2009 Author Share Posted May 19, 2009 Oops sorry know now what the L stands for.. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now