| View previous topic :: View next topic |
| Author |
Message |
kitterz Grandmaster Cheater Supreme
Reputation: 0
Joined: 24 Dec 2007 Posts: 1268
|
Posted: Sat Aug 23, 2008 3:28 pm Post subject: C++ Exe functions |
|
|
Is there any way to use the functions, somehow on another exe? Or simulate a button press of another exe virtuall, without acctually pressing it?
Lol this might be dumb.
What I am wondering, is if I can somehow send keys to an app using On-Screen Keyboard (OSK.exe), but problematically (C++) instead of manually.
|
|
| Back to top |
|
 |
lurc Grandmaster Cheater Supreme
Reputation: 2
Joined: 13 Nov 2006 Posts: 1900
|
Posted: Sat Aug 23, 2008 4:38 pm Post subject: |
|
|
Well, if you wanna simulate a message such as a key press, then you can send a message to that window with the message being WM_KEYDOWN.
Use FindWindow to get the main window.
Then use SendMessage or PostMessage to send the message to that window.
_________________
Last edited by lurc on Sat Aug 23, 2008 4:40 pm; edited 1 time in total |
|
| Back to top |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Sat Aug 23, 2008 4:40 pm Post subject: |
|
|
| PostMessage and tell the button it's been clicked.
|
|
| Back to top |
|
 |
kitterz Grandmaster Cheater Supreme
Reputation: 0
Joined: 24 Dec 2007 Posts: 1268
|
Posted: Sat Aug 23, 2008 8:07 pm Post subject: |
|
|
| lurc wrote: | Well, if you wanna simulate a message such as a key press, then you can send a message to that window with the message being WM_KEYDOWN.
Use FindWindow to get the main window.
Then use SendMessage or PostMessage to send the message to that window. |
Well i know how to use PostMessage....but the thing is, I want to send VK_UP and such
And as you know, directonal keys do not work with postmessage to MapleStory
But I know that OSK.exe can send direction keys...so ya.
| slovach wrote: | | PostMessage and tell the button it's been clicked. |
How would I specift which button out of the bunch to press? using POINT Pos (Pos.x and Pos.y) would be very unreliable.
|
|
| Back to top |
|
 |
samuri25404 Grandmaster Cheater
Reputation: 7
Joined: 04 May 2007 Posts: 955 Location: Why do you care?
|
Posted: Sat Aug 23, 2008 9:19 pm Post subject: |
|
|
You're thinking of something different.
Anyways, what I would do is basically (if you're not gonna go the PM way), find the X and Y coordinates of the window, then add the offsets of the button from the top left corner of the window.
If you don't understand it, then just check out some computer graphics things. It's really simple, though.
_________________
|
|
| Back to top |
|
 |
pkedpker Master Cheater
Reputation: 1
Joined: 11 Oct 2006 Posts: 412
|
Posted: Sat Aug 23, 2008 9:29 pm Post subject: |
|
|
use Microsoft Spy++ on Maplestory and find out what keys are used to move your character.. it doesn't only tell you WM_KEYUP it tells you the number for WM_KEYUP if it has been changed.. so u can make a new
const int WM_KEYUP2 = 0xNEW_number_from_spy++;
_________________
|
|
| Back to top |
|
 |
sponge I'm a spammer
Reputation: 1
Joined: 07 Nov 2006 Posts: 6009
|
Posted: Sat Aug 23, 2008 9:51 pm Post subject: |
|
|
Impossible, character movement is using DirectInput.
umm samurai NO. FindWindowEx to find the buttons handle. Then PostMessage to it.
_________________
|
|
| Back to top |
|
 |
Wintermoot Expert Cheater
Reputation: 0
Joined: 08 Nov 2007 Posts: 198
|
Posted: Mon Aug 25, 2008 3:44 am Post subject: |
|
|
According to Spy++:
Left arrow key:
Caption: IDB_LFDNARW
Class: M106
Right arrow key:
Caption: IDB_RHDNARW
Class: M108
Up arrow key:
Caption: IDB_UPDNARW
Class: M90
Down arrow key:
Caption: IDB_DNDNARW
Class: M107
|
|
| Back to top |
|
 |
kitterz Grandmaster Cheater Supreme
Reputation: 0
Joined: 24 Dec 2007 Posts: 1268
|
Posted: Mon Aug 25, 2008 9:57 am Post subject: |
|
|
| HawwwaH wrote: | According to Spy++:
Left arrow key:
Caption: IDB_LFDNARW
Class: M106
Right arrow key:
Caption: IDB_RHDNARW
Class: M108
Up arrow key:
Caption: IDB_UPDNARW
Class: M90
Down arrow key:
Caption: IDB_DNDNARW
Class: M107 |
Ok....so what do we do to make it possible to send arrow keys with this stuff?
|
|
| Back to top |
|
 |
nog_lorp Grandmaster Cheater
Reputation: 0
Joined: 26 Feb 2006 Posts: 743
|
Posted: Mon Aug 25, 2008 1:47 pm Post subject: |
|
|
As for calling functions in another process, you can use CreateRemoteThread.
If you want to use a function from an EXE in your own process (rather than running it remotely in another process), you can treat EXE's like libraries, and use LoadLibrary and GetProcAddress.
_________________
Mutilated lips give a kiss on the wrist of the worm-like tips of tentacles expanding in my mind
I'm fine accepting only fresh brine you can get another drop of this yeah you wish |
|
| Back to top |
|
 |
|