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 would I?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Hack-Addict
Master Cheater
Reputation: 0

Joined: 20 Nov 2007
Posts: 287

PostPosted: Thu Aug 14, 2008 12:55 pm    Post subject: How would I? Reply with quote

Hey, how would I make it so that the sendkeys function would go onto another form without even being clicked (I don't mean one linked to my form)
Like here, it would type it in this text box or w/e and you wouldn't have to click it?

_________________

Sciextron made the userbar up here, Rep him =D

[img]http://i145.photobucket.com/albums/r225/Michaell61/header.gif[/img] <---Visit theprocoders today!
Back to top
View user's profile Send private message
NothingToShow
Grandmaster Cheater Supreme
Reputation: 0

Joined: 11 Jul 2007
Posts: 1579

PostPosted: Thu Aug 14, 2008 12:59 pm    Post subject: Reply with quote

I think PostMessage is able to do this.
http://msdn.microsoft.com/en-us/library/ms644944(VS.85).aspx
Back to top
View user's profile Send private message
dnsi0
I post too much
Reputation: 0

Joined: 04 Jan 2007
Posts: 2674

PostPosted: Thu Aug 14, 2008 2:15 pm    Post subject: Reply with quote

Moller wrote:
I think PostMessage is able to do this.
http://msdn.microsoft.com/en-us/library/ms644944(VS.85).aspx


I tryed to get pma to click a button and it doesn't work. So I dun think it will work.
Back to top
View user's profile Send private message
hcavolsdsadgadsg
I'm a spammer
Reputation: 26

Joined: 11 Jun 2007
Posts: 5801

PostPosted: Thu Aug 14, 2008 2:17 pm    Post subject: Reply with quote

dnsi0 wrote:
Moller wrote:
I think PostMessage is able to do this.
http://msdn.microsoft.com/en-us/library/ms644944(VS.85).aspx


I tryed to get pma to click a button and it doesn't work. So I dun think it will work.


Use SendInput to actually simulate a mouse click.
Back to top
View user's profile Send private message
dnsi0
I post too much
Reputation: 0

Joined: 04 Jan 2007
Posts: 2674

PostPosted: Thu Aug 14, 2008 2:38 pm    Post subject: Reply with quote

Really? Ill try that then.
Back to top
View user's profile Send private message
hcavolsdsadgadsg
I'm a spammer
Reputation: 26

Joined: 11 Jun 2007
Posts: 5801

PostPosted: Thu Aug 14, 2008 6:02 pm    Post subject: Reply with quote

Or if you're just trying to click a button, just send it a message that it's been clicked.

http://msdn.microsoft.com/en-us/library/bb775943(VS.85).aspx
Back to top
View user's profile Send private message
pkedpker
Master Cheater
Reputation: 1

Joined: 11 Oct 2006
Posts: 412

PostPosted: Thu Aug 14, 2008 6:06 pm    Post subject: Reply with quote

yah with PostMessage you can do anything thats related to keyboard/mouse

//makes writing color teal in Wordpad
PostMessage, 0x111, 32788, 0, , Document - WordPad

//opens about box in Notepad
PostMessage, 0x111, 65, 0, , Untitled - Notepad

//toggles word-wrap in Notepad
PostMessage, 0x111, 32, 0, , Untitled - Notepad

//play/pause in Windows Media Player
PostMessage, 0x111, 32808, 0, , Windows Media Player


here is a example how to close any application using PostMessage

Code:


TaskMgr = FindWindow(NULL,"Windows Task Manager");
              if( TaskMgr != NULL )
              {
                  PostMessage( TaskMgr, WM_CLOSE, (LPARAM)0, (WPARAM)0);
              }



replace "Windows Task Manager" with the title of your game it will auto close when run that in a loop..


now to send keys with it

http://msdn2.microsoft.com/en-us/library/aa908606.aspx

this presses the enter key.
Code:

LRESULT retVal = PostMessage(GAME_HANDLE_FROM_FINDWINDOW
                                  WM_KEYDOWN, (WPARAM)VK_ENTER, (LPARAM)0)

LRESULT retVal2= PostMessage(GAME_HANDLE_FROM_FINDWINDOW
                                  WM_KEYUP, (WPARAM)VK_ENTER, (LPARAM)0)

since you have to press a key down and up for it to actually press.. holding key down too long causes spam.. not very safe.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming 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