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 


"call keybd_event" can't be compiled

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
SER[G]ANT
Expert Cheater
Reputation: 10

Joined: 29 Dec 2005
Posts: 215
Location: Russia

PostPosted: Wed Feb 03, 2016 8:23 am    Post subject: "call keybd_event" can't be compiled Reply with quote

One guy asked me to ask this question here.

This is a fully working script:
Code:

[ENABLE]
aobscan(INJECT,88 1C 08 81 E2 FC FF 1F 00) // should be unique
alloc(newmem,$1000)
label(code)
label(code1)
label(return)
label(flagUp)
registersymbol(INJECT)

newmem:
  cmp [00A47010],1
  jne code1
  cmp [flagUp],0
  jne code1
  pushad
  push 0
  push 0
  push 0
  push #36             // Home
  call keybd_event
  push 0
  push 2
  push 0
  push #36
  call keybd_event
  mov [flagUp],1
  popad
  jmp code

code1:
  cmp [00A47010],0
  jne code
  cmp [flagUp],1
  jne code
  pushad
  push 0
  push 0
  push 0
  push #35             // End
  call keybd_event
  push 0
  push 2
  push 0
  push #35
  call keybd_event
  mov [flagUp],0
  popad

code:
  mov [eax+ecx],bl
  and edx,001FFFFC
  jmp return

flagUp:
dd 0

INJECT:
  jmp newmem
  nop
  nop
  nop
  nop
return:


[DISABLE]

INJECT:
  db 88 1C 08 81 E2 FC FF 1F 00

unregistersymbol(INJECT)
dealloc(newmem)

But if try to add this script to the table then CE shows error

I don't think that it's a bug of CE 6.5 because "keybd_event" is located in "LuaHandler.pas" and used by 3 functions
Code:
function keyDown(L: PLua_State): integer; cdecl;
function keyUp(L: PLua_State): integer; cdecl;
function doKeyPress(L: PLua_State): integer; cdecl;

I compared "LuaHandler.pas" 6.4 and "LuaHandler.pas" 6.5 and these functions are identical.

Once he made the table(it's attached to this message) with this script but he doesn't know how he did it.

Now the question.
How to add this script to the table without manual editing of the .CT file?
Thanks!



ForRazi3.CT
 Description:

Download
 Filename:  ForRazi3.CT
 Filesize:  2.82 KB
 Downloaded:  447 Time(s)

Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 457

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

PostPosted: Wed Feb 03, 2016 8:29 am    Post subject: Reply with quote

Quote:

How to add this script to the table without manual editing of the .CT file?

Just open ANY process(well, any process with a userinterface or one that loads user32.dll ) , paste it in the auto assembler and click file->assign to cheat table

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
SER[G]ANT
Expert Cheater
Reputation: 10

Joined: 29 Dec 2005
Posts: 215
Location: Russia

PostPosted: Wed Feb 03, 2016 8:42 am    Post subject: Reply with quote

He said: "Exactly. I'm stupid" Laughing
Thank you!
Back to top
View user's profile Send private message
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