| View previous topic :: View next topic |
| Author |
Message |
Hack-Addict Master Cheater
Reputation: 0
Joined: 20 Nov 2007 Posts: 287
|
Posted: Thu Aug 14, 2008 12:55 pm Post subject: How would I? |
|
|
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?
_________________
|
|
| Back to top |
|
 |
NothingToShow Grandmaster Cheater Supreme
Reputation: 0
Joined: 11 Jul 2007 Posts: 1579
|
|
| Back to top |
|
 |
dnsi0 I post too much
Reputation: 0
Joined: 04 Jan 2007 Posts: 2674
|
Posted: Thu Aug 14, 2008 2:15 pm Post subject: |
|
|
I tryed to get pma to click a button and it doesn't work. So I dun think it will work.
|
|
| Back to top |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Thu Aug 14, 2008 2:17 pm Post subject: |
|
|
| dnsi0 wrote: |
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 |
|
 |
dnsi0 I post too much
Reputation: 0
Joined: 04 Jan 2007 Posts: 2674
|
Posted: Thu Aug 14, 2008 2:38 pm Post subject: |
|
|
| Really? Ill try that then.
|
|
| Back to top |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
|
| Back to top |
|
 |
pkedpker Master Cheater
Reputation: 1
Joined: 11 Oct 2006 Posts: 412
|
Posted: Thu Aug 14, 2008 6:06 pm Post subject: |
|
|
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 |
|
 |
|