Dude!

What does this demo do when you run it, and what are you running it with?

Im using A7.86.0 Comm and the mouse performs the little squares, but it also wanders off to the top-left of the screen...

Did it do that for you?!?


[EDIT] PS: I will be getting to your PM later tonite...

[EDIT 2] For what it is worth, here is a savagely cut down version of meh_masters code....
windows.h no longer requires, ans structs over-simplified...
(still has the drift problem on my machine...)
Click to reveal..
Code:
#include <acknex.h>
#include <default.c>


long __stdcall SendInput(long cInputs,long pInputs,long cbSize);
API(SendInput,user32)


typedef struct MOUSEINPUT
{
    long	type;				//unused : always ZERO for mouse
    long	dx, dy;			//move mouse by dx, dy pixels
    long	unused_0;		//unused
    long	dwFlags;			//static : always 0x1 for mouse-input 
    long unused_1[2];	//unused
} MOUSEINPUT;



void mouseMove(int dx, int dy)
{
   static MOUSEINPUT* input = NULL;	
   if(!input)	{ 	input = sys_malloc(sizeof(MOUSEINPUT));	
   					memset(input, 0, sizeof(MOUSEINPUT));
   					input.dwFlags = 0x1;							}
	//-----------------------------------------------------
   input.dx = dx;
   input.dy = dy;
   SendInput(0x1, input, sizeof(MOUSEINPUT));
}




void main()
{
	level_load("");
	while(1)
	{
		mouseMove(40,0);
		wait(1);
		mouseMove(0,40);
		wait(1);
		mouseMove(-40,0);
		wait(1);
		mouseMove(0,-40);
		wait(1);
	}
}




Last edited by EvilSOB; 12/15/10 09:35. Reason: code added

"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial