Hey, I use D 1.041 with Tango 0.99.8 and wondered how I would move by moving the mouse and simulating the keyboard, press and receive information from the screen, for example, the color of a specific pixel at a specific coordinate. I am using windows.
Any help would be greatly appreciated. I want to program a class-based library with functionality similar to AutoIt. For example:
mouse.move(100, 200);
mouse.click(2);
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 this? I am still using the version .
source
share