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 


can you make CE send key inputs to the selected process?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
LastExceed
Expert Cheater
Reputation: 1

Joined: 05 Nov 2014
Posts: 130

PostPosted: Wed Apr 15, 2015 10:46 am    Post subject: can you make CE send key inputs to the selected process? Reply with quote

Is there any way to make CE send key inputs to the selected process? for example something like

"press key (F) for 3 seconds"

or

"push key F"
sleep(3000)
"release key F"
Back to top
View user's profile Send private message
aikoncwd
Grandmaster Cheater
Reputation: 23

Joined: 21 Dec 2012
Posts: 591
Location: Spain (Barcelona)

PostPosted: Wed Apr 15, 2015 11:17 am    Post subject: Reply with quote

I don't know if CE can achieve that... but there is a easy method to send keys using VBS (Visual Basic Script)

Code:

Set oWSH = CreateObject("WScript.Shell")

oWSH.Run "notepad"

WScript.Sleep 1000

oWSH.AppActivate "Bloc de Notas"

WScript.Sleep 1000

oWSH.SendKeys "{ENTER}"
oWSH.SendKeys "This is an example"


More info:

http://social.technet.microsoft.com/wiki/contents/articles/5169.vbscript-sendkeys-method.aspx

Then you can use LUA to call this VBS script from a button (trainer) or directly when a CMP is trigged via auto-assembler, etc...

Or maybe you can do this using LUA only... I don't know Razz

_________________
Hey Hitler
Test here your skill with CheatEngine, I coded a challenge for you. Try to beat it!
HERE
Back to top
View user's profile Send private message
LastExceed
Expert Cheater
Reputation: 1

Joined: 05 Nov 2014
Posts: 130

PostPosted: Wed Apr 15, 2015 11:20 am    Post subject: Reply with quote

AikonCWD wrote:
I don't know if CE can achieve that... but there is a easy method to send keys using VBS (Visual Basic Script)

Code:

Set oWSH = CreateObject("WScript.Shell")

oWSH.Run "notepad"

WScript.Sleep 1000

oWSH.AppActivate "Bloc de Notas"

WScript.Sleep 1000

oWSH.SendKeys "{ENTER}"
oWSH.SendKeys "This is an example"


More info:

http://social.technet.microsoft.com/wiki/contents/articles/5169.vbscript-sendkeys-method.aspx

Then you can use LUA to call this VBS script from a button (trainer) or directly when a CMP is trigged via auto-assembler, etc...

Or maybe you can do this using LUA only... I don't know Razz


Thanks, but I have no idea how to code VB or how to create a trainer with it Very Happy
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 471

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

PostPosted: Wed Apr 15, 2015 11:59 am    Post subject: Reply with quote

no, not to another process, but you can use the doKeyPress(vk) function to emulate a keypress on the keyboard on the currently focused process
_________________
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
LastExceed
Expert Cheater
Reputation: 1

Joined: 05 Nov 2014
Posts: 130

PostPosted: Wed Apr 15, 2015 12:07 pm    Post subject: Reply with quote

Dark Byte wrote:
no, not to another process, but you can use the doKeyPress(vk) function to emulate a keypress on the keyboard on the currently focused process


thanks, this is exactly what i was looking for. Is there also a way to create a hotkey for this? (i know it makes no sense to create a hotkey for pressing another key, but)
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 Lua Scripting 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