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 


Interfacing with CE from my own script...

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
theonetrueace
Newbie cheater
Reputation: 0

Joined: 05 Feb 2008
Posts: 14

PostPosted: Sun Dec 28, 2008 7:24 pm    Post subject: Interfacing with CE from my own script... Reply with quote

so i'm trying to have my program send a hotkey to ce to have it do when the hotkey is supposed to do....i am writing all the code from the bottom (api) .... i've been using SendInput for all my sending of keystrokes until now .... I just havent been able to get CE to see the keystrokes I'm sending... is there any specific thing that would not permit this from working....I don't know what type of hook CE is using for the hotkeys, but my own hook sees the keystrokes as being sent....last but not least, yes I did check the keystrokes via the keyboard and they do work....

any ideas?
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 474

Joined: 09 May 2003
Posts: 25930
Location: The netherlands

PostPosted: Mon Dec 29, 2008 4:32 am    Post subject: Reply with quote

for hotkeys ce uses getasynckeystate and only activates when all the required keys are down

Of course, it helps if you just say what hotkey you are trying to trigger

_________________
Tools give you results. Knowledge gives you control.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
theonetrueace
Newbie cheater
Reputation: 0

Joined: 05 Feb 2008
Posts: 14

PostPosted: Mon Dec 29, 2008 12:49 pm    Post subject: Reply with quote

nm got it working Smile

Last edited by theonetrueace on Mon Dec 29, 2008 1:41 pm; edited 3 times in total
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 474

Joined: 09 May 2003
Posts: 25930
Location: The netherlands

PostPosted: Mon Dec 29, 2008 1:38 pm    Post subject: Reply with quote

PostMessage(cemainwindowhandle,WM_HOTKEY,2,0);

should toggle the speedhack

_________________
Tools give you results. Knowledge gives you control.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
theonetrueace
Newbie cheater
Reputation: 0

Joined: 05 Feb 2008
Posts: 14

PostPosted: Mon Dec 29, 2008 1:43 pm    Post subject: Reply with quote

ill try the postmessage also..... Wink but i put kb_event in just to try it and it works with the 150ms pause....must have something wrong with my vars on the sendinput commands....thx for the info, sry to waste ur time Neutral

can u explain which var is telling ce which hotkey to press? the postmessage command works as u said but i want to use it to do other hotkeys in ce aswell
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 474

Joined: 09 May 2003
Posts: 25930
Location: The netherlands

PostPosted: Mon Dec 29, 2008 2:11 pm    Post subject: Reply with quote

It's handled in the hotkey and hotkey2 methods in mainform.

anyhow,
for the normal wm_hotkey message:
0: Bring ce to front
2: toggle speedhack
10+ : Activate a hotkey that has been assigned to a cheat table entry (can be any random number)

then there's the second generation of hotkey implementation using wm_user+800 or wm_user+0x800 (depending on which ce version you used, had a small typo, that didn't affect the hotkey implementation since it was on a const/define used by the rest of the code )
0: Bring ce to front
1: pause
2: toggle speedhack (it's implemented twice)
3-7: Set speedhack speed
8: increase speed with specified delta
9: decrease speed with specified delta
10-18: Change selected scantype
19: New scan
20: First scan exact value
21: First scan unknown initial value
22: Next scan exact valuer
23: next scan IncreasedValue
24: next scan DecreasedValue
25: next scan ChangedValue
26: next scan unchangedValue
27: undo lastscan
28: cancel current scan

_________________
Tools give you results. Knowledge gives you control.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
theonetrueace
Newbie cheater
Reputation: 0

Joined: 05 Feb 2008
Posts: 14

PostPosted: Mon Dec 29, 2008 2:33 pm    Post subject: Reply with quote

thx much...got it working....

PostMessage(nWnd, WM_USER + &H800&, 2, 0) ' Toggle
PostMessage(nWnd, WM_USER + &H800&, 3, 0) ' Enables SH1

again thanks much Wink

edit: ok just so I know, what versions/builds were affected with this lil misprint bug....
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 474

Joined: 09 May 2003
Posts: 25930
Location: The netherlands

PostPosted: Mon Dec 29, 2008 4:10 pm    Post subject: Reply with quote

5.3 and earlier I think. Not sure when I found this small bug
_________________
Tools give you results. Knowledge gives you control.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine 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