Цитата:
Сообщение от Electronic_Arts
если код не большой может напишеш
|
Я конечно могу, только не всегда же за тебя что-то писать будут
![Радость](images/smilies/smile.gif)
Читаем хелп:
Цитата:
The mouse_event function synthesizes mouse motion and button clicks.
VOID mouse_event(
DWORD dwFlags, // flags specifying various motion/click variants
DWORD dx, // horizontal mouse position or position change
DWORD dy, // vertical mouse position or position change
DWORD dwData, // amount of wheel movement
DWORD dwExtraInfo // 32 bits of application-defined information
) ;
|
получается что для того чтобы просто кликнуть нам понадобится передать функции только первые три параметра (остальные - 0). Сразу скажу, что второй и третий параметры это экранные координаты в которых будем кликать, а первый - константа действия. Про нее читаем дальше в хелпе:
Цитата:
MOUSEEVENTF_ABSOLUTE Specifies that the dx and dy parameters contain normalized absolute coordinates. If not set, those parameters contain relative data: the change in position since the last reported position. This flag can be set, or not set, regardless of what kind of mouse or mouse-like device, if any, is connected to the system. For further information about relative mouse motion, see the following Remarks section.
MOUSEEVENTF_MOVE Specifies that movement occurred.
MOUSEEVENTF_LEFTDOWN Specifies that the left button changed to down.
MOUSEEVENTF_LEFTUP Specifies that the left button changed to up.
MOUSEEVENTF_RIGHTDOWN Specifies that the right button changed to down.
MOUSEEVENTF_RIGHTUP Specifies that the right button changed to up.
MOUSEEVENTF_MIDDLEDOWN Specifies that the middle button changed to down.
MOUSEEVENTF_MIDDLEUP Specifies that the middle button changed to up.
MOUSEEVENTF_WHEEL Windows NT only: Specifies that the wheel has been moved, if the mouse has a wheel. The amount of movement is given in dwData
|
т.е. если хочешь кликнуть левой кнопкой, то нужно сделать так:
Код:
mouse_event(MOUSEEVENTF_LEFTDOWN,100,100,0,0);
mouse_event(MOUSEEVENTF_LEFTUP,100,100,0,0);
и всего делов. Читайте HELP и будет вам счастье
![Радость](images/smilies/smile.gif)