GREAT SCOTT

I think I have it!!

Program now does what I want it to .. Yay!!

For anyone else who wants to achieve a similar feat:

First you must go into acknex's windows.h, and uncomment 'long WINAPI SendInput(long cInputs,long pInputs,long cbSize);'

Also, 'API(SendInput,user32)' needs to be added there, and then this code will work:


Code:
#include <acknex.h>
#include <default.c>
#include <windows.h>

typedef unsigned long ULONG_PTR;


typedef struct tagMOUSEINPUT {
    LONG    dx;
    LONG    dy;
    DWORD   mouseData;
    DWORD   dwFlags;
    DWORD   time;
    ULONG_PTR dwExtraInfo;
} MOUSEINPUT;


#define INPUT_MOUSE     0

typedef struct tagINPUT {
    DWORD   type;
    MOUSEINPUT      mi;
} INPUT;

void mouseMove(int dx, int dy)
{
   INPUT* input = sys_malloc(sizeof(INPUT));
	 
   input.type = INPUT_MOUSE;
	 
   input.mi.dx = dx;
   input.mi.dy = dy;
   input.mi.mouseData = 0;
   input.mi.dwFlags = MOUSEEVENTF_MOVE;
   input.mi.time = 0;
   input.mi.dwExtraInfo = 0;
 
   SendInput(1, input, sizeof(INPUT));
   sys_free(input);
}

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



Yes!!!

Thanks Richi007 for the help wink!!