SRL Archive - SRL Archives

lardmasters uberbored mouse


lardmaster

2006-10-21 15:49:52

hmm.. i dont know about anyone else, but frequently when on the computer, i swirl the mouse in circles when im bored. i wrote this program to do that, i just wanted to see what other people think of it and how many parameters it should have before i turn it into a procedure. perhaps it could be part of boredhuman!


EDIT: UBERUPDATE!!!~!!!

program coolcircles;

var i,offsetsin,offsetcos:extended;
tox,toy,lastx,lasty,xmove,ymove,centerx,centery,deformx,deformy:integer;
reverse:boolean;
begin
reverse:=random(2)=1;
sleep(1000);
getmousepos(centerx,centery);
centerx:=centerx-100;
deformx:=100;
deformy:=100;
while (i<random(25)+40) and (i>-1*(random(25)+40))do begin
if random(20)=1 then begin
offsetsin:=random(round(Pi()*100/3))/100;
offsetcos:=random(round(pi()*100/3))/100;
end
if random(12)=1 then deformx:=deformx-17+random(38);
if random(12)=1 then deformy:=deformy-17+random(38);
xmove:=random(3)-1;
ymove:=random(3)-1;
tox:=round(cos(i+offsetcos)*deformx)+xmove+centerx;
toy:=round(sin(i+offsetcos)*deformy)+ymove+centery;
movemouse(tox,toy);
sleep(random(2)+1);
if not reverse then i:=i+20/sqrt(sqr(deformx)+sqr(deformy))
else i:=i-20/sqrt(sqr(deformx)+sqr(deformy));
getmousepos(lastx,lasty);
if random(20)=1 then begin
getmousepos(lasty,lasty);
centerx:=round(lastx-(cos(i)*deformx))+random(21)-10;
centery:=round(lasty-(sin(i)*deformy))+random(21)-10;
end
end
i:=0;
getmousepos(centerx,centery);
deformx:=200;
deformy:=5;
offsetsin:=Pi()/3;
offsetcos:=0;
if random(3)=1 then begin
reverse:=random(2)=1;
while (i<15+random(10)) and (i>-1*(15+random(10))) do begin
if random(2)=1 then begin
offsetcos:=random(round(pi*100/2))/100;
offsetsin:=random(round(pi*100/2))/100;
end
if random(60)=1 then begin
deformx:= 150+random(100);
deformy:= 3+random(10);
end
xmove:=random(3)-1;
ymove:=random(3)-1;
movemouse(round(cos(i+offsetcos)*deformx+centerx+xmove),round(sin(i+offsetsin)*deformy)+centery+ymove);
if not reverse then i:=i+0.2
else i:=1-0.2;
sleep(5);
end
end
//pickupmouse procedures but i dont want to
//include srl because compling is slow on my comp
end.

any comments on its randomness, or any questions are welcome.

EDIT: i did uberupdate, i dont see much wrong with it now
EDIT2:tweaked a little, was doing too big circles, going to edge of screen.

Yakman

2006-10-21 16:53:55

thats…very good
this is what i got from testing it with paint, different tests have different colors

note: the very long straght lines are when i used HoldMouse but the script starts in another place, so it draws that very long line

i noticed that the movements are a bit unhumanlike,
sometimes the line just jerks a little for no reason,
i think you might be able to solve it by removing some of the randoms and using MMouse instead of MoveMouse, i think Benlands alogarithm would be random enough.

another thing is that it should use GetMousePos somewhere, so that the mouse doesnt suddenly move accoss the screen, like what happened in my tests and drew that huge long line

apart from that, really great :D

lardmaster

2006-10-21 20:50:36

yeah, i know about benlands algorithm, i decided not to use it, because other random mouse movements use it and it is clear where one move ends and the other begins. it seems a lot worse on paint than it did when i tested with i-bot, ibot just shows the points where mouse events are sent.

i updated it, removed a lot of the random mouse jumps, and added a little something special at the end! (this is all based on what i do when im bored)

EDIT: i did an 1/4*uber update!
EDIT2:tweaked it a little

UBERUPDATE!!

i tested it on paint, and it still jumps around a bit