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 


Hide the mouse.

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

Joined: 07 Jan 2016
Posts: 272
Location: My house

PostPosted: Mon Dec 05, 2016 4:08 pm    Post subject: Hide the mouse. Reply with quote

To leave a hack that I created for a game, I would like that certain moments the mouse was hidden.
How can I do this?

_________________
...
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 152

Joined: 06 Jul 2014
Posts: 4702

PostPosted: Mon Dec 05, 2016 7:17 pm    Post subject: Reply with quote

Call ShowCursor from whatever thread created the window.
_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
Filipe_Br
Master Cheater
Reputation: 3

Joined: 07 Jan 2016
Posts: 272
Location: My house

PostPosted: Tue Dec 06, 2016 5:46 am    Post subject: Reply with quote

It's more like I can make a script in Lua or assembly. Because with this information, I still do not know how to hide the mouse.
_________________
...
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 152

Joined: 06 Jul 2014
Posts: 4702

PostPosted: Tue Dec 06, 2016 8:57 am    Post subject: Reply with quote

assembly:
Code:
push 0
call User32.ShowCursor

_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
Filipe_Br
Master Cheater
Reputation: 3

Joined: 07 Jan 2016
Posts: 272
Location: My house

PostPosted: Tue Dec 06, 2016 12:59 pm    Post subject: Reply with quote

I guess just showing me step by step '-'.
I have two doubts.
1 - For either this "push 0"
2 - How exactly I use this script to disappear and show the mouse, in the window of a certain game.

Code:

  openProcess("Tutorial-x86_64.exe")
  autoAssemble([[
  alloc(code, 2000)
  createthread(code)

  code:
  push 0
  call User32.ShowCursor
  ret
  ]])


This script just makes the tutorial stop working

_________________
...
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 152

Joined: 06 Jul 2014
Posts: 4702

PostPosted: Tue Dec 06, 2016 1:16 pm    Post subject: Reply with quote

1 - I don't know what you're trying to say. push 0 is pushing an argument onto the stack. It's the stdcall calling convention. For 64-bit calling conventions, see this.

2 - That's why I said it needs to be executed from whatever thread created the window.

If you want to do it from some other thread like that, then the first thing that comes to my mind is hooking the window's WndProc function and writing code to handle a user window message. Then just send a message to the window however you want that tells it whether it should show its cursor or not.

I will not show you how to do that step by step since I would be here all day. Learn the basics first (e.g. how to call a function). I'm sure there are some tutorials you can find online.

_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
Filipe_Br
Master Cheater
Reputation: 3

Joined: 07 Jan 2016
Posts: 272
Location: My house

PostPosted: Tue Dec 06, 2016 1:24 pm    Post subject: Reply with quote

I'll see if I find out, it's going to be difficult, after all I do not speak English, and the best information is in English.
_________________
...
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Tue Dec 06, 2016 1:51 pm    Post subject: Reply with quote

If you're not sure how to call a function, you can try manipulating internal, game values to achieve the desired effect.

Depending on how the target was programed, the cursor may have an on/off boolean that can be found, a transparency value and/or a size modifier etc. - all of which may be used, depending.

Sometimes, just switching over to joystick can automatically remove the mouse from the screen, providing scan opportunities.

Finding mouse coordinates may get you a size modifier or allow you to force the mouse off-screen, rendering it useless.

Pausing target, entering a special sub-menu/screen and or performing scans during cinematic sequences or the like may get you an on/off boolean...and etcetera...

Worst-case scenario, you can bulk-edit values of 3F800000 (float 1.0) to 0 and see what happens. Mr. Green
Back to top
View user's profile Send private message
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