Mouse speed

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
Machariel
Newbie
Posts: 15
Joined: Mon Mar 10, 2008 8:40 pm

Mouse speed

Post by Machariel » Thu Mar 13, 2008 4:54 pm

Hi. How to slow down the mouse moving speed in the intire script ?
________
K1200RS
Last edited by Machariel on Tue Feb 01, 2011 11:34 pm, edited 1 time in total.

User avatar
Rain
Automation Wizard
Posts: 550
Joined: Tue Aug 09, 2005 5:02 pm
Contact:

Post by Rain » Mon Mar 17, 2008 1:26 pm

Add a wait after MouseMove

Code: Select all

MouseMove>10,10
Wait>0.1
MouseMove>20,20
Wait>0.1
//End so on

Me_again
Automation Wizard
Posts: 1101
Joined: Fri Jan 07, 2005 5:55 pm
Location: Somewhere else on the planet

Post by Me_again » Mon Mar 17, 2008 3:10 pm

If you are going to use the same wait multiple times it's a good idea to set the wait interval as a variable, then you can change the speed of operation of the script by editing one line instead of many:

Code: Select all

Let>wt=0.1
MouseMove>10,10
Wait>wt
MouseMove>20,20
Wait>wt
//End so on


User avatar
Marcus Tettmar
Site Admin
Posts: 7380
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Mon Mar 17, 2008 3:13 pm

If you just want to slow the entire script down just set the STEP_DELAY variable at the start of the script:

Let>STEP_DELAY=100

STEP_DELAY takes a number of milliseconds and causes that delay between each and every line.

If you just want to use a step delay in a section of code then set STEP_DELAY at the start of the code section and set it back to zero afterwards.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Machariel
Newbie
Posts: 15
Joined: Mon Mar 10, 2008 8:40 pm

Post by Machariel » Tue Mar 18, 2008 12:05 pm

Thanks for the answers :wink: But what I mean is, how to (slow down mouse moving speed) if I set a wait> betwen two mousemove> commands, it is not slowing down the mouse moving speed... it is only setting a pause betwen the two commands (and yes, you can say that is a kind of slowing down the mouse speed, but that is not what I mean) It has to REALLY slow down the mouse speed, like when you move the mouse with you hand, you move it with diffrent speed.

??
________
Jaguar R1 picture
Last edited by Machariel on Tue Feb 01, 2011 11:34 pm, edited 1 time in total.

User avatar
Marcus Tettmar
Site Admin
Posts: 7380
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Tue Mar 18, 2008 12:37 pm

MouseMove moves the mouse TO the desired position - immediately. If you want to see the mouse moving BETWEEN start and finish, then you need lots of MouseMoves. E.g. try this:

Code: Select all

Let>x=0
Repeat>x
  Let>x=x+1
  MouseMove>x,50
  Wait>0.05
Until>x=500
Perhaps that is what you are asking for.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Machariel
Newbie
Posts: 15
Joined: Mon Mar 10, 2008 8:40 pm

Post by Machariel » Tue Mar 18, 2008 1:02 pm

Thanks for you quick respond... I will try this out :)
________
Lio Ho
Last edited by Machariel on Tue Feb 01, 2011 11:34 pm, edited 1 time in total.

idiot
Macro Veteran
Posts: 152
Joined: Thu Mar 01, 2007 9:21 am

Post by idiot » Thu Apr 03, 2008 3:53 am

on the same topic is there a way to change the way the mouse moves instead of being stright line movements more like arked curves like you would have if you where actually using the mouse it wouldnt be perfectly stright lines :D
if idiots rule the world then im the king!!!!
i want a free t-shirt give me all of your rep!!!
please give me pro version of macro scheduler and appnavigator!!!

User avatar
Marcus Tettmar
Site Admin
Posts: 7380
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Thu Apr 03, 2008 7:31 am

idiot wrote:on the same topic is there a way to change the way the mouse moves instead of being stright line movements more like arked curves like you would have if you where actually using the mouse it wouldnt be perfectly stright lines :D
Of course. It just requires digging out your old high school maths. Try this:

Code: Select all

//center position of ciorcle
Let>cx=500
Let>cy=500

//start and end angles
Let>angle1=0
Let>angle2=2

//radius of circle
Let>radius=100

Let>count=angle1
Repeat>count
  Let>count=count+0.1
  Let>x2={round(%radius% * Sin(%count%) + %cx%)}
  Let>y2={round(%radius% * Cos(%count%) + %cy%)}
  MouseMove>x2,y2
  Wait>0.02
Until>count=angle2
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

idiot
Macro Veteran
Posts: 152
Joined: Thu Mar 01, 2007 9:21 am

my script is broken help!!!

Post by idiot » Sat Apr 05, 2008 11:15 pm

basically i want to slow mouse so you can see it have it move in an arc and useing the findcolor.dll all together

Code: Select all

label>start
Let>x=0
Repeat>x
  Let>x=x+1
  MouseMove>x,50
  Wait>0.05
Until>x=500
Let>cx=500
Let>cy=500

//start and end angles
Let>angle1=0
Let>angle2=2

//radius of circle
Let>radius=100

Let>count=angle1
Repeat>count
  Let>count=count+0.1
  Let>x2={round(%radius% * Sin(%count%) + %cx%)}
  Let>y2={round(%radius% * Cos(%count%) + %cy%)}
  MouseMove>x2,y2
  Wait>0.02
Until>count=angle2
label>mine
Let>fcLib=%SCRIPT_DIR%\findcolor.dll
LibFunc>fcLib,FindColor,r,192,137,223,646,557,xres,yres
If>r=1
  Let>x=r_6
  Let>y=r_7
  MouseMove>x,y
  lclick
goto>start

how do i use all these together :?: :x
if idiots rule the world then im the king!!!!
i want a free t-shirt give me all of your rep!!!
please give me pro version of macro scheduler and appnavigator!!!

User avatar
uniadv
Junior Coder
Posts: 29
Joined: Tue Aug 04, 2020 2:16 am

Re:

Post by uniadv » Wed Aug 19, 2020 8:15 am

Marcus Tettmar wrote:
Tue Mar 18, 2008 12:37 pm
MouseMove moves the mouse TO the desired position - immediately. If you want to see the mouse moving BETWEEN start and finish, then you need lots of MouseMoves. E.g. try this:

Code: Select all

Let>x=0
Repeat>x
  Let>x=x+1
  MouseMove>x,50
  Wait>0.05
Until>x=500
That Worked Perfectly! Thanks.

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts