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 do you send keys to a window?
Goto page Previous  1, 2
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
sponge
I'm a spammer
Reputation: 1

Joined: 07 Nov 2006
Posts: 6009

PostPosted: Tue Nov 20, 2007 9:15 pm    Post subject: Reply with quote

blankrider wrote:
Because you should always use a lower level approach to anything.

Besides, SendInput is blocked in maplestory. I don't think translate/dispatch message is. And i'm pretty sure SendInput is a wrapper for t/d msgs ...

And call 2 api because it's faster and more efficient.

First bold. I wasn't even talking about SendInput. Rolling Eyes
Second bold. No!

_________________
Back to top
View user's profile Send private message
HomerSexual
Grandmaster Cheater Supreme
Reputation: 5

Joined: 03 Feb 2007
Posts: 1657

PostPosted: Tue Nov 20, 2007 9:17 pm    Post subject: Reply with quote

Oh i meant PostMessage is blocked *

PostMessage is just a wrapper for t&d message so anything PostMessage can do t&d can do.

_________________


Last edited by HomerSexual on Tue Nov 20, 2007 9:18 pm; edited 1 time in total
Back to top
View user's profile Send private message
dnsi0
I post too much
Reputation: 0

Joined: 04 Jan 2007
Posts: 2674

PostPosted: Tue Nov 20, 2007 9:18 pm    Post subject: Reply with quote

Can some1 just fix up my script T.T
Back to top
View user's profile Send private message
sponge
I'm a spammer
Reputation: 1

Joined: 07 Nov 2006
Posts: 6009

PostPosted: Tue Nov 20, 2007 9:19 pm    Post subject: Reply with quote

PostMessage is the easiest thing to bypass.
Additionally, T/D Message was originally used in the WndProc. PostMessage was used to send messages.

_________________
Back to top
View user's profile Send private message
HomerSexual
Grandmaster Cheater Supreme
Reputation: 5

Joined: 03 Feb 2007
Posts: 1657

PostPosted: Tue Nov 20, 2007 9:19 pm    Post subject: Reply with quote

how about you learn Very Happy

Sponge do you even know what a message is? read pedzolts book. I posted it.

The message que is what translate&dispatch uses. Post message puts the message in the que but doesn't process it. When you call T&D message directly you are processing the message and immediately processing the que. This is important in processing many messages.

_________________
Back to top
View user's profile Send private message
Flyte
Peanuts!!!!
Reputation: 6

Joined: 19 Apr 2006
Posts: 1887
Location: Canada

PostPosted: Tue Nov 20, 2007 9:22 pm    Post subject: Reply with quote

blankrider wrote:
Because you should always use a lower level approach to anything.

blankrider wrote:
I was assuming he isn't going to write a driver for sending simple keys...that would just be silly.


Wait... what?

blankrider wrote:
how about you learn Very Happy


Statement made out of ignorance. Confused

blankrider wrote:
Sponge do you even know what a message is? read pedzolts book. I posted it.

The message que is what translate&dispatch uses. Post message puts the message in the que but doesn't process it. When you call T&D message directly you are processing the message and immediately processing the que. This is important in processing many messages.


We applaud you in your wonderful grasp of basic user mode windows programming.


Last edited by Flyte on Tue Nov 20, 2007 9:41 pm; edited 1 time in total
Back to top
View user's profile Send private message
HomerSexual
Grandmaster Cheater Supreme
Reputation: 5

Joined: 03 Feb 2007
Posts: 1657

PostPosted: Tue Nov 20, 2007 9:28 pm    Post subject: Reply with quote

Shove the sarcasm Flyte. Understanding usermode is key to all win32 programming. Could you do kernel mode if usermode was a blur?

And i was simply educating sponge on usermode. Most delphi users don't understand it. I didn't till i picked up c++.

And how is that statement made of ignorance. People shouldn't come in saying "Fix my Code" when someone just posted a link to the api and told them what they did wrong.

Someone get the toilet paper so we can wipe dnsi0's ass.

_________________
Back to top
View user's profile Send private message
sponge
I'm a spammer
Reputation: 1

Joined: 07 Nov 2006
Posts: 6009

PostPosted: Tue Nov 20, 2007 9:36 pm    Post subject: Reply with quote

If a method is erroneous will you use it? I think not.
and in this case... it is NOT the better option. because maple's wndproc is already bloated to an extreme. I would much rather let it sit on the queue and wait for maple to process it IN THE ORDER ITS SUPPOSE TO BE IN! Rolling Eyes
Let the program catch the message off the queue and then let it process it by itself. like irwin said people do not put enough delay... so if you let the process process (<<eew.) the messages in turn it will not be overloaded.

_________________


Last edited by sponge on Tue Nov 20, 2007 9:39 pm; edited 2 times in total
Back to top
View user's profile Send private message
dnsi0
I post too much
Reputation: 0

Joined: 04 Jan 2007
Posts: 2674

PostPosted: Tue Nov 20, 2007 9:40 pm    Post subject: Reply with quote

Please... Just Fix the Post Script................... And Im not trying to bot maple...
Back to top
View user's profile Send private message
slippppppppp
Grandmaster Cheater
Reputation: 0

Joined: 08 Aug 2006
Posts: 929

PostPosted: Tue Nov 20, 2007 9:45 pm    Post subject: Reply with quote

I know a few by heart.

SendMessage:
Var
Wnd : hWnd;
begin
Wnd := findwindow('Windownamehere',0);
Sendmessage(Wnd, WM_KEydown, $5A, 0);
//5A = Z in VK
end;

PostMessage:
Var
Wnd : hWnd;
begin
Wnd := findwindow('Windownamehere',0);
postmessage(Wnd, WM_KEydown, $5A, 0);
//5A = Z in VK
end;


Translate/Dispatch:
var
MSG : TMSG;
begin
MSG. hWnd := findwindow('WINDOWHERE',0);
MSG.Lparam := $5A; // VK code here
MSG.Wparam := 0;
MSG.Message := Wm_Keydown;
TranslateMessage(MSG);
DispatchMessage(MSG);
end;
// or write a procedure for it.
Back to top
View user's profile Send private message AIM Address MSN Messenger
HomerSexual
Grandmaster Cheater Supreme
Reputation: 5

Joined: 03 Feb 2007
Posts: 1657

PostPosted: Tue Nov 20, 2007 9:48 pm    Post subject: Reply with quote

correction the message is in all caps

WM_KEYDOWN i think (not sure) that the messages are defined and are actually numerical values. so Wm_keydown won't be the same as WM_KEYDOWN

_________________
Back to top
View user's profile Send private message
dnsi0
I post too much
Reputation: 0

Joined: 04 Jan 2007
Posts: 2674

PostPosted: Tue Nov 20, 2007 9:50 pm    Post subject: Reply with quote

How do you search for the active window???
Back to top
View user's profile Send private message
Flyte
Peanuts!!!!
Reputation: 6

Joined: 19 Apr 2006
Posts: 1887
Location: Canada

PostPosted: Tue Nov 20, 2007 10:00 pm    Post subject: Reply with quote

dnsi0 wrote:
How do you search for the active window???


GetForegroundWindow():
http://msdn2.microsoft.com/en-us/library/ms633505.aspx
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Wed Nov 21, 2007 2:45 pm    Post subject: Reply with quote

Flyte wrote:
dnsi0 wrote:
How do you search for the active window???


GetForegroundWindow():
http://msdn2.microsoft.com/en-us/library/ms633505.aspx


Just cause it's the foreground window, it doesn't mean it is the active one.

GetActiveWindow():
http://msdn2.microsoft.com/en-us/library/ms646292.aspx

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
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