Foros del Web » Programación para mayores de 30 ;) » .NET »

autoclick using mouse_event does not work with Game

Estas en el tema de autoclick using mouse_event does not work with Game en el foro de .NET en Foros del Web. Hi everyone, I am making my own autoclick in C#, the reason?? simple i want to play a game online when i am sleeping. What ...
  #1 (permalink)  
Antiguo 19/12/2006, 07:02
Avatar de dwaks  
Fecha de Ingreso: agosto-2002
Ubicación: Panamá
Mensajes: 962
Antigüedad: 21 años, 9 meses
Puntos: 15
Información autoclick using mouse_event does not work with Game

Hi everyone,

I am making my own autoclick in C#, the reason?? simple i want to play a game online when i am sleeping.

What I need? easy: I need to make my own autoclick with the right button of the mouse.

What I have? I have the autoclick working with other applications, like: desktop, iexplorer, winamp and others.

I am using the key F10 to active the autoclick and the same key to deactive.

I am using
System.IntPtr iHandle = (System.IntPtr)FindWindow("Game", null);
SetForegroundWindow(iHandle);

mouse_event(MOUSEEVENTF_RIGHTDOWN, (uint)pt.X, (uint)pt.Y, 0, new System.IntPtr());
mouse_event(MOUSEEVENTF_RIGHT_UP, (uint)pt.X, (uint)pt.Y, 0, new System.IntPtr());

This code is working but not do the click in the game, this game is fullscreen but i change that using GWL_STYLE and now the window have caption and border.

I dont know why I cant click into the game.

I will give you more information about the game:

I downloaded another application (autoclick) and it is working fine (it can do the click), This application can click the game but i dont want to use this application. I told you about it because this is the test, and i know I can do the click but I am looking for the right way.

NOTE: I have other version using: SendInput and it is not working neither.

I am waiting for ur help guys.
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 09:43.