Hey, I'm using D 1.041 with Tango 0.99.8 and was wondering how I would go about moving the mouse and simulating keyboard presses and getting infos from the screen, for example the color of a specific pixel on a specific coordinate. I'm using Windows.
Any help would be greatly appreciated. I want to program a class-based library with functionality that resembles AutoIt's. For example:
mouse.move(100, 200);
mouse.click(2); // 2 = Middle Mouse Click
keyboard.type('abc');
import tango.sys.win32.UserGdi;
class Mouse{
alias SetCursorPos set_pos;
alias GetCursorPos get_pos;
void left_click(){
mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0);
mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0);
}
void right_click(){
mouse_event(MOUSEEVENTF_RIGHTDOWN, 0, 0, 0);
mouse_event(MOUSEEVENTF_RIGHTUP, 0, 0, 0);
}
}
This code gives me the following error:
Error 42: Symbol Undefined _mouse_event@16 --- errorlevel 1
Any help on that? I'm still using version.