SRL Archive - SRL Snippets

SSMouse


m3gaman3g3nd

2012-01-06 18:49:12

SUPER SAIJAN MOUSE


(*
SSMouse
~~~~

moves the mouse to point. it has a random calling decision for a different combination of wait clicks
and misclicks to just and normal mouse.



uses / examples

SSMouse ( x , y , 5 , 5 , True ) ;


*)

procedure SSMouse ( mousex , mousey , ranx , rany : Integer ; button : variant ) ;
begin
case Random ( 12 ) of
0 : begin
MMouse ( mousex , mousey , ranx , rany ) ;
GetMousePos ( mousex , mousey ) ;
Wait ( 100 + Random ( 100 ) ) ;
Mouse ( mousex , mousey , 1 , 1 , Button ) ;
PickUpMouse ;
end ;
1 : begin
Mouse ( mousex , mousey , ranx , rany , Button ) ;
PickUpMouse ;
end ;
2 : begin
MMouse ( mousex , mousey , ranx , rany ) ;
GetMousePos ( mousex , mousey ) ;
Wait ( 50 + Random ( 50 ) ) ;
MissMouse ( mousex , mousey ) ;
Mouse ( mousex , mousey , 1 , 1 , Button ) ;
PickUpMouse ;
end ;
3 : begin
MMouse ( mousex , mousey , ranx , rany ) ;
GetMousePos ( mousex , mousey ) ;
Wait ( 100 + Random ( 100 ) ) ;
Mouse ( mousex , mousey , 1 , 1 , Button ) ;
end ;
4 : begin
Mouse ( mousex , mousey , ranx , rany , button ) ;
end;
5 : begin
MMouse ( mousex , mousey , ranx , rany ) ;
GetMousePos ( mousex , mousey ) ;
Wait ( 50 + Random ( 50 ) ) ;
MissMouse ( mousex , mousey ) ;
Mouse ( mousex , mousey , 1 , 1 , Button ) ;
end ;
6 : begin
Wait ( 50 + Random ( 50 ) ) ;
PickUpMouse ;
Wait ( 50 + Random ( 50 ) ) ;
MMouse ( mousex , mousey , ranx , rany ) ;
GetMousePos ( mousex , mousey ) ;
Wait ( 100 + Random ( 100 ) ) ;
Mouse ( mousex , mousey , 1 , 1 , Button ) ;
end ;
7 : begin
Wait ( 50 + Random ( 50 ) ) ;
PickUpMouse ;
Mouse ( mousex , mousey , ranx , rany , button ) ;
end ;
8 : begin
Wait ( 50 + Random ( 50) ) ;
PickUpMouse ;
Wait ( 50 + Random ( 50 ) ) ;
MMouse ( mousex , mousey , ranx , rany ) ;
GetMousePos ( mousex , mousey ) ;
Wait ( 50 + Random ( 50 ) ) ;
MissMouse ( mousex , mousey ) ;
Mouse ( mousex , mousey , 1 , 1 , Button ) ;
end ;
9 : begin
Wait ( 50 + Random ( 50 ) ) ;
PickUpMouse ;
Wait ( 50 + Random ( 50 ) ) ;
MMouse ( mousex , mousey , ranx , rany ) ;
GetMousePos ( mousex , mousey ) ;
Wait ( 100 + Random ( 100 ) ) ;
Mouse ( mousex , mousey , 1 , 1 , Button ) ;
PickUpMouse ;
end ;
10 : begin
Wait ( 50 + Random ( 50 ) ) ;
PickUpMouse ;
Mouse ( mousex , mousey , ranx , rany , button ) ;
PickUpMouse ;
end ;
11 : begin
Wait ( 50 + Random ( 50 ) ) ;
PickUpMouse ;
Wait ( 50 + Random ( 50 ) ) ;
MMouse ( mousex , mousey , ranx , rany ) ;
GetMousePos ( mousex , mousey ) ;
Wait ( 50 + Random ( 50 ) ) ;
MissMouse ( mousex , mousey ) ;
Mouse ( mousex , mousey , 1 , 1 , Button ) ;
PickUpMouse ;
end ;
end ;
end ;

YoHoJo

2012-01-06 18:51:36

I'm lost what is this?
Is this something you made yourself, or something you found around on the forums?

You can just copy/paste it into your script and use it as you wish, do not mess with include files if you don't know what you're doing.

m3gaman3g3nd

2012-01-06 18:55:17

No i wanted to add it in one of the files
ie. either the mouse.simba or antirandom.simba core files i beleive.

like i said just a useful snippet

YoHoJo

2012-01-06 19:01:21

If you want to use a 'useful snippet' just put it into your script.

SRL is for procedures/funtions the devs deem popper to be inside SRL.
I don't think they will add that into SRL itself, but you can still use it.

Just copy and paste it into your script above all the other procedures/functions you have.

And when you want to use it just put the line SSMouse(your parameters here)

m3gaman3g3nd

2012-01-06 19:07:24

Hmm yes will do.. btw i pm you and just disregard i guess…

shstiger2009

2012-01-06 19:31:17

Thanks, I might use this! I'm assuming from Yohojo's posts, you wanted this added in SRL…?

Anyway, looks nice and random. Sweet. ;)