Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


How to develop a mouse motion tracking?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
Aylin
Master Cheater
Reputation: 7

Joined: 16 Feb 2017
Posts: 405

PostPosted: Fri Nov 08, 2019 5:11 pm    Post subject: How to develop a mouse motion tracking? Reply with quote

Hello.
I have two pictures of mouse movements.
And they're sensitive to possible mouse movements, they need to move.
I set 3 trajectories with simple codes.
With 5mm shifts that are sensitive to mouse movements.
The code works fine, but I need to make some improvements.
For example: How do I provide one-to-one motion instead of 3 trajectories?
So: How do I move one by one, one by one instead of a 5mm shift?
1mm + 1mm + 1mm + 1mm + 1mm = 5mm ..



Code:
--UDF1.CEImage1.Height = 302 - Width=261 - Left=80 - Top=18
--UDF1.Height = 384 - Width=426
 UDF1.CEImage2.Top = 138
 UDF1.CEImage3.Top = 138
 UDF1.CEImage2.Left = 181
 UDF1.CEImage3.Left = 216

function TopMove(sender)
 local x,y = getMousePos()
 x,y = UDF1.CEImage1.ScreenToClient(x,y)
 if y > 135 then
 UDF1.CEImage2.Top = 139
 UDF1.CEImage3.Top = 139
 elseif y > 125 then
 UDF1.CEImage2.Top = 136
 UDF1.CEImage3.Top = 136
 elseif y > 110 then
 UDF1.CEImage2.Top = 134
 UDF1.CEImage3.Top = 134
 end
end

function LeftMove(sender)
 local x,y = getMousePos()
 x,y = UDF1.CEImage1.ScreenToClient(x,y)
 if x > 160 then
 UDF1.CEImage2.Left = 186
 UDF1.CEImage3.Left = 219
 elseif x > 115 then
 UDF1.CEImage2.Left = 187
 UDF1.CEImage3.Left = 211
 elseif x > 100 then
 UDF1.CEImage2.Left = 180
 UDF1.CEImage3.Left = 213
 end
end


The explanation may be weak, I apologize for it.
Thanks in advance for rare ideas.

EDIT :

"For the little witch, it was a nice pastime.
The cat's eye movements amuse him. Smile "

Video:

Link


Enjoy it! Wink



Cats and Birds.PNG
 Description:
 Filesize:  643.93 KB
 Viewed:  599 Time(s)

Cats and Birds.PNG




Last edited by Aylin on Wed Nov 13, 2019 1:52 pm; edited 2 times in total
Back to top
View user's profile Send private message MSN Messenger
DaSpamer
Grandmaster Cheater Supreme
Reputation: 28

Joined: 13 Sep 2011
Posts: 1468

PostPosted: Mon Nov 11, 2019 5:34 pm    Post subject: Reply with quote

Why not use a timer and move it by pixel by pixel (or some sort of logic) until boundaries box/radius are reached?
_________________
HEY Hitler
Do you get lazy when making trainers?
Well no more!
My CETrainer will generate it for you in seconds, so you won't get lazy! Very Happy

http://forum.cheatengine.org/viewtopic.php?t=564919
Back to top
View user's profile Send private message
Aylin
Master Cheater
Reputation: 7

Joined: 16 Feb 2017
Posts: 405

PostPosted: Tue Nov 12, 2019 2:52 pm    Post subject: Reply with quote

DaSpamer wrote:
Why not use a timer and move it by pixel by pixel (or some sort of logic) until boundaries box/radius are reached?


Sorry for the late response.
If I'm not mistaken: for each picture, I have to create a main point.
And if the Mouse moves away from or from the main point, the Left and Top will change proportionally.
I'il try.
Still, I would appreciate it if you crowned your idea with a sample code. Smile
Thanks for the answer.

_________________
Hi Hitler Make a Youtube Web for Trainer
https://forum.cheatengine.org/viewtopic.php?t=609146
Enthusiastic people: Always one step ahead
Do not underestimate me Master: You were a beginner in the past
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites