Hi guys, i would like to be able move mouse cursor automaticaly from one coordinate to another and so on. I used the USER32.DLL function but i'm not sure to use it correctly.
For exemple, i need to place the cursor at (50,50) and 1 second later at (100,100) and another second later (50,50) and so on.
This is the code i tried but it gives me an error and force the application to close. I start the toggle movement using a simple button.
What's wrong with my code ?
Thanks a lot,
Stephen
-- wait one second
min = 1;
max = 1000;
for count = min, max do
end
-- move cursor to (50,50)
result = DLL.CallFunction("AutoPlay\\Docs\\user32.dll", "SetCursorPos", "50,50", DLL_RETURN_TYPE_INTEGER, DLL_CALL_STDCALL);
-- wait one second
min = 1;
max = 1000;
for count = min, max do
end
-- move cursor to (100,100)
result = DLL.CallFunction("AutoPlay\\Docs\\user32.dll", "SetCursorPos", "100,100", DLL_RETURN_TYPE_INTEGER, DLL_CALL_STDCALL);
AND EVENTUALY LOOP HERE
For exemple, i need to place the cursor at (50,50) and 1 second later at (100,100) and another second later (50,50) and so on.
This is the code i tried but it gives me an error and force the application to close. I start the toggle movement using a simple button.
What's wrong with my code ?
Thanks a lot,
Stephen
-- wait one second
min = 1;
max = 1000;
for count = min, max do
end
-- move cursor to (50,50)
result = DLL.CallFunction("AutoPlay\\Docs\\user32.dll", "SetCursorPos", "50,50", DLL_RETURN_TYPE_INTEGER, DLL_CALL_STDCALL);
-- wait one second
min = 1;
max = 1000;
for count = min, max do
end
-- move cursor to (100,100)
result = DLL.CallFunction("AutoPlay\\Docs\\user32.dll", "SetCursorPos", "100,100", DLL_RETURN_TYPE_INTEGER, DLL_CALL_STDCALL);
AND EVENTUALY LOOP HERE
Comment