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 


CE 6.5.1 and "sendMessage".

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
Dr.Disrespect
Grandmaster Cheater
Reputation: 3

Joined: 17 Feb 2016
Posts: 526

PostPosted: Sat Jun 11, 2016 1:30 pm    Post subject: CE 6.5.1 and "sendMessage". Reply with quote

Can anyone give a simple explanation about the"sendMessage" function provided in CE 6.5.1? What the purpose of this function? Does it mean that I can show a message window to the user of my trainer?
Thanks in advance.

Edit:
I have already read this:
https://msdn.microsoft.com/en-us/library/windows/desktop/ms644950(v=vs.85).aspx

But I still haven't got a clear understanding of this function. What's the difference between "sendMessage" and "showMessage"? Why do we need "sendMessage" at all in CE?
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 138

Joined: 06 Jul 2014
Posts: 4275

PostPosted: Sat Jun 11, 2016 2:24 pm    Post subject: Reply with quote

fmanager wrote:
What's the difference between "sendMessage" and "showMessage"?

The word "message" refers to two different things with regards to those two functions. You should already know what showMessage does, but the meaning of the word "message" in the sendMessage function is described here:
Quote:
The system passes input to a window procedure in the form of a message. Messages are generated by both the system and applications. The system generates a message at each input event—for example, when the user types, moves the mouse, or clicks a control such as a scroll bar. The system also generates messages in response to changes in the system brought about by an application, such as when an application changes the pool of system font resources or resizes one of its windows. An application can generate messages to direct its own windows to perform tasks or to communicate with windows in other applications.


fmanager wrote:
Why do we need "sendMessage" at all in CE?

I'm sure it would be useful in some circumstances, just like how other miscellaneous functions are useful in other circumstances (e.g. executeCode, shellExecute, etc.). That being said, if you don't know what it is, you probably don't need to use it.

_________________
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
Dr.Disrespect
Grandmaster Cheater
Reputation: 3

Joined: 17 Feb 2016
Posts: 526

PostPosted: Sat Jun 11, 2016 2:47 pm    Post subject: Reply with quote

ParkourPenguin wrote:
fmanager wrote:
What's the difference between "sendMessage" and "showMessage"?

The word "message" refers to two different things with regards to those two functions. You should already know what showMessage does, but the meaning of the word "message" in the sendMessage function is described here:
Quote:
The system passes input to a window procedure in the form of a message. Messages are generated by both the system and applications. The system generates a message at each input event—for example, when the user types, moves the mouse, or clicks a control such as a scroll bar. The system also generates messages in response to changes in the system brought about by an application, such as when an application changes the pool of system font resources or resizes one of its windows. An application can generate messages to direct its own windows to perform tasks or to communicate with windows in other applications.


fmanager wrote:
Why do we need "sendMessage" at all in CE?

I'm sure it would be useful in some circumstances, just like how other miscellaneous functions are useful in other circumstances (e.g. executeCode, shellExecute, etc.). That being said, if you don't know what it is, you probably don't need to use it.


Thanks for the reply, Penguin. Can you think of a circumstance under which "sendMessage" is needed? I am really curious and want to know if I can use it in my trainer. Smile
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 138

Joined: 06 Jul 2014
Posts: 4275

PostPosted: Sat Jun 11, 2016 5:04 pm    Post subject: Reply with quote

I've never used it personally, but obviously it depends on what you're working with and what you're trying to do. See this list for examples of stuff you can do with it. Sometimes it's easier to use other things (e.g. directly calling a function, using SendInput to send input).

If you want to include it in your trainer just to include it, then you should rethink your rationale.
If you're trying to do something specific in a game, don't know how, and think that this might be one way you can do it, then post what you're trying to do so people can give you less generic help.
If you're just learning, then I'm not going to copy and paste all the documentation Microsoft has on messages.

The best generic advice I can give is to start learning.

_________________
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
Dr.Disrespect
Grandmaster Cheater
Reputation: 3

Joined: 17 Feb 2016
Posts: 526

PostPosted: Sat Jun 11, 2016 10:28 pm    Post subject: Reply with quote

ParkourPenguin wrote:
I've never used it personally, but obviously it depends on what you're working with and what you're trying to do. See this list for examples of stuff you can do with it. Sometimes it's easier to use other things (e.g. directly calling a function, using SendInput to send input).

If you want to include it in your trainer just to include it, then you should rethink your rationale.
If you're trying to do something specific in a game, don't know how, and think that this might be one way you can do it, then post what you're trying to do so people can give you less generic help.
If you're just learning, then I'm not going to copy and paste all the documentation Microsoft has on messages.

The best generic advice I can give is to start learning.


Thanks for the info. I want the game to pop up a message box when some conditions are met. I was wondering if sendMessage could be used for that purpose. Smile
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 138

Joined: 06 Jul 2014
Posts: 4275

PostPosted: Sun Jun 12, 2016 8:26 am    Post subject: Reply with quote

Even if you could, it would probably be better to use the MessageBox function for displaying a message box.
_________________
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
Dr.Disrespect
Grandmaster Cheater
Reputation: 3

Joined: 17 Feb 2016
Posts: 526

PostPosted: Sun Jun 12, 2016 1:58 pm    Post subject: Reply with quote

ParkourPenguin wrote:
Even if you could, it would probably be better to use the MessageBox function for displaying a message box.


OK, thank you Penguin. I will try to use it.
Back to top
View user's profile Send private message
mgr.inz.Player
I post too much
Reputation: 218

Joined: 07 Nov 2008
Posts: 4438
Location: W kraju nad Wisla. UTC+01:00

PostPosted: Thu Jun 16, 2016 12:30 pm    Post subject: Reply with quote

ParkourPenguin wrote:
I'm sure it would be useful in some circumstances, just like how other miscellaneous functions are useful in other circumstances.



If you have progressbar object, you can set state with sendMessage function:


Code:
oldState =  sendMessage(UDF1.CEProgressbar1.Handle, 0x410, 1, 0)  -- Normal

oldState =  sendMessage(UDF1.CEProgressbar1.Handle, 0x410, 2, 0)  -- Error

oldState =  sendMessage(UDF1.CEProgressbar1.Handle, 0x410, 3, 0)  -- Paused

_________________
Back to top
View user's profile Send private message MSN Messenger
Dr.Disrespect
Grandmaster Cheater
Reputation: 3

Joined: 17 Feb 2016
Posts: 526

PostPosted: Wed Jun 22, 2016 7:58 pm    Post subject: Reply with quote

mgr.inz.Player wrote:
ParkourPenguin wrote:
I'm sure it would be useful in some circumstances, just like how other miscellaneous functions are useful in other circumstances.



If you have progressbar object, you can set state with sendMessage function:


Code:
oldState =  sendMessage(UDF1.CEProgressbar1.Handle, 0x410, 1, 0)  -- Normal

oldState =  sendMessage(UDF1.CEProgressbar1.Handle, 0x410, 2, 0)  -- Error

oldState =  sendMessage(UDF1.CEProgressbar1.Handle, 0x410, 3, 0)  -- Paused


Thanks, Very Happy Sorry for the late reply.
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 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