# Thread: non linear mouse movement?

1. SRL Junior Member
Join Date
Feb 2012
Posts
218
Mentioned
1 Post(s)
Quoted
8 Post(s)

## non linear mouse movement?

is there a way to move your mouse from a point to another on a arc of a circle instead of a straigh line?

2. Mess around with the different params for WindMouse? you can get it to look like half a circle... sort of

3. SRL Junior Member
Join Date
Feb 2012
Posts
218
Mentioned
1 Post(s)
Quoted
8 Post(s)
there's alot of parameters to 'mess' with in there. to many for trial/error method.

4. SRL Junior Member
Join Date
Feb 2012
Posts
218
Mentioned
1 Post(s)
Quoted
8 Post(s)
what im trying to do is is make my mouse move on points on a predetermined circle. This part i made, i just want the mouse to follow the circle circonference when it moves from point to point on that circle.
i know the maths and stuff, i just dont know what function to modify. i think maybe modify the lape _move?

5. SRL Junior Member
Join Date
Feb 2012
Posts
218
Mentioned
1 Post(s)
Quoted
8 Post(s)
So i made a bit of code to move the mouse around a predetermined circle circonference.

Simba Code:
[CODE]program new;{$i srl-6/srl.simba}{$i ETL_Lape.simba}PROCEDURE CIRCLE;varc:TpointArray;h,i:integer;beginc:=TPAfromCircle(841,483,65);  H := high(c);  SortCircleWise(c,841,483,0,false,false);  filterPointsPie(c,0.0,360.0,62,66,841,483); // 0.0 start angle and 360.0 end angle in degrees    for I := 0 to h do    mouse(c[i],MOUSE_MOVE);   //   ETL_DrawTPA(c,clYellow,False);    writeln(Inttostr(c[i].x)+'/'+inttostr(c[i].y)); end begincircle;end.    [/CODE]

when i use 0 and 360, it works perfect, the mouse follows the circle for a full rotation. however when i change the start and end angle, 0 and 90 for example, i get:
'The following bitmaps were not freed: [Minimap Mask]'
this seems to happens for anything other than 0 and 360.

any1 knows why and/or how to fix this?

thank you

6. SRL Junior Member
Join Date
Jun 2015
Posts
36
Mentioned
0 Post(s)
Quoted
5 Post(s)
Try putting the H := High(c); after FilterPointsPie. I think you are getting an index out of range error.

7. SRL Junior Member
Join Date
Feb 2012
Posts
218
Mentioned
1 Post(s)
Quoted
8 Post(s)
seems like it solved it, thank you very much!

8. SRL Junior Member
Join Date
Jul 2017
Posts
31
Mentioned
0 Post(s)
Quoted
11 Post(s)
thanks need for the code will be using this

There are currently 1 users browsing this thread. (0 members and 1 guests)

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•