Hi, i am wanting to add a auto-stig bot to my PlvlPal program but am stuck as to what to do, I have done the following code to automate a mouse click but it only works on the window infront.
Code:
[DllImport("user32.dll",CharSet=CharSet.Auto, CallingConvention=CallingConvention.StdCall)]
public static extern void mouse_event(long dwFlags, long dx, long dy, long cButtons, long dwExtraInfo);
private const int RIGHTMOUSEDOWN = 0x08;
private void MouseClick(int x, int y)
{
Cursor.Position = new Point(x,y);
mouse_event(RIGHTMOUSEDOWN,Cursor.Position.X,Cursor.Position.Y,0,0);
}
ofc this isnt good enough as it needs to stig whilst in the background. Am I on the right track? is there something that i need to do extra to make it send the click to a background task? If im on track or not, is there a good tutorial that anyone can suggest?
Thanks, Origonal