Re: Visual C++ examples for GUI automation
Hello!
You should have a look at AutoIt/AutoItX:
http://www.autoitscript.com/autoit3/
Aurelien
SQACSharp a ??crit :
Hi,
I'm looking for visual C++ (2005) examples for doing GUI automation.
Ex: Typing text to a notepad window, Clicking button in the windows
calculator and retrieving the result.
Any releated link will be usefull... I do this with VB using
enumwindow, SetWindowText, SetForeground window, SendMessage windows
API... but all the C++ examples found on the internet are not working
as expected.. ex:
#include <windows.h>
// Notepad must be started
int main()
{
HWND hWnd, hWndChild;
hWnd = FindWindow(NULL, L"Untitled - Notepad");
hWndChild = GetWindow(hWnd, GW_CHILD);
SendMessage((HWND) hWnd, WM_SETTEXT,0, (LPARAM)"New
Caption");
SendMessage((HWND) hWndChild, WM_SETTEXT,0,
(LPARAM)"New body text");
return 0;
}
This example change the caption and the text in the body for garbage
like "???" ([])
Any help?? Thanks!
Michel