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 


C++ Exe functions

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
kitterz
Grandmaster Cheater Supreme
Reputation: 0

Joined: 24 Dec 2007
Posts: 1268

PostPosted: Sat Aug 23, 2008 3:28 pm    Post subject: C++ Exe functions Reply with quote

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
View user's profile Send private message Send e-mail
lurc
Grandmaster Cheater Supreme
Reputation: 2

Joined: 13 Nov 2006
Posts: 1900

PostPosted: Sat Aug 23, 2008 4:38 pm    Post subject: Reply with quote

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
View user's profile Send private message
hcavolsdsadgadsg
I'm a spammer
Reputation: 26

Joined: 11 Jun 2007
Posts: 5801

PostPosted: Sat Aug 23, 2008 4:40 pm    Post subject: Reply with quote

PostMessage and tell the button it's been clicked.
Back to top
View user's profile Send private message
kitterz
Grandmaster Cheater Supreme
Reputation: 0

Joined: 24 Dec 2007
Posts: 1268

PostPosted: Sat Aug 23, 2008 8:07 pm    Post subject: Reply with quote

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 Very Happy

And as you know, directonal keys do not work with postmessage to MapleStory Sad

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
View user's profile Send private message Send e-mail
samuri25404
Grandmaster Cheater
Reputation: 7

Joined: 04 May 2007
Posts: 955
Location: Why do you care?

PostPosted: Sat Aug 23, 2008 9:19 pm    Post subject: Reply with quote

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.

_________________
Wiccaan wrote:

Oh jeez, watchout I'm a bias person! Locked.


Auto Assembly Tuts:
In Depth Tutorial on AA
Extended
Back to top
View user's profile Send private message
pkedpker
Master Cheater
Reputation: 1

Joined: 11 Oct 2006
Posts: 412

PostPosted: Sat Aug 23, 2008 9:29 pm    Post subject: Reply with quote

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++;

_________________
Hacks I made for kongregate.
Kongregate Universal Badge Hack: http://forum.cheatengine.org/viewtopic.php?p=4129411
Kongreate Auto Rating/Voter hack: http://forum.cheatengine.org/viewtopic.php?t=263576
Took a test lol
Back to top
View user's profile Send private message
sponge
I'm a spammer
Reputation: 1

Joined: 07 Nov 2006
Posts: 6009

PostPosted: Sat Aug 23, 2008 9:51 pm    Post subject: Reply with quote

Impossible, character movement is using DirectInput.

umm samurai NO. FindWindowEx to find the buttons handle. Then PostMessage to it.

_________________
Back to top
View user's profile Send private message
Wintermoot
Expert Cheater
Reputation: 0

Joined: 08 Nov 2007
Posts: 198

PostPosted: Mon Aug 25, 2008 3:44 am    Post subject: Reply with quote

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
View user's profile Send private message
kitterz
Grandmaster Cheater Supreme
Reputation: 0

Joined: 24 Dec 2007
Posts: 1268

PostPosted: Mon Aug 25, 2008 9:57 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
nog_lorp
Grandmaster Cheater
Reputation: 0

Joined: 26 Feb 2006
Posts: 743

PostPosted: Mon Aug 25, 2008 1:47 pm    Post subject: Reply with quote

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
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