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 


Execute Script From Hotkey?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
superseani2
How do I cheat?
Reputation: 0

Joined: 26 Feb 2012
Posts: 5

PostPosted: Thu Aug 24, 2017 10:37 pm    Post subject: Execute Script From Hotkey? Reply with quote

I know we can push button in Lua but... can we Push a Button to Execute a Lua?.


Simple question :ç Yet No awnsers, probably not emplemented :O!!! How could i achieve this? :$? Really need it :ç



this button.png
 Description:
 Filesize:  152.25 KB
 Viewed:  10870 Time(s)

this button.png


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

Joined: 21 Feb 2016
Posts: 115

PostPosted: Fri Aug 25, 2017 1:44 am    Post subject: Reply with quote

You blocked out the game name but not the "Online" part...

Anyways what you want can be easily done just look around the forums for examples of hotkey scripts (there's dozens of them), but CE community doesn't support online cheating.
Back to top
View user's profile Send private message
FreeER
Grandmaster Cheater Supreme
Reputation: 53

Joined: 09 Aug 2013
Posts: 1091

PostPosted: Fri Aug 25, 2017 5:52 am    Post subject: Reply with quote

There's nothing really game specific in this question so I don't mind answering it

In AA
http://wiki.cheatengine.org/index.php?title=Auto_Assembler:LUA_ASM

you could also use the lua createHotkey if you didn't want to create the hotkey on the memory record itself for whatever reason.
Back to top
View user's profile Send private message
superseani2
How do I cheat?
Reputation: 0

Joined: 26 Feb 2012
Posts: 5

PostPosted: Fri Aug 25, 2017 9:18 am    Post subject: INdeed Reply with quote

ITs been a question i was asking myself a long time ago i masked them actually because Yea... This wasnt about the game itself :O

I wasnt feeling like i was talking about SPeedhacking in a GAME but rather the Implemented Speedhack Function in CE

Anyway My code look like this and work Perfectly ^^! But you PROBABLY already know how it look like :

Code:
function func(sender)


speedhack_setSpeed(-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001)
sleep(1732)
speedhack_setSpeed(1)

return true
end

hkey=createHotkey("func",VK_Z)
generichotkey_onHotkey(hkey,func)
Back to top
View user's profile Send private message
gamegamer01
How do I cheat?
Reputation: 0

Joined: 11 Jun 2023
Posts: 3

PostPosted: Sun Jun 11, 2023 5:16 am    Post subject: Reply with quote

i am working on a generic trainer. i already have a cheat table with scripts forspaghetti monstermode, etc. setup with hotkeys. i only have to add speedhack to it.

tutorials i saw on youtube and other platforms guide how to do it using a clickable button on trainer. i am looking to use a hotkey to toggle speedhack.

until now, on this forum i have got an idea that it is possible by creating function in lua script and then assigning a function to hotkey.

what i dont know is where do i put that code? i only know that on trainer design window, we click button and double click it to open lua script for it.

but i want a hotkey not a button. i hope i am clear and not confusing.

also, i wonder if someone can help me find a list of hotkey codes for keyboard, like vk_a, vk_b. i want to assign speed hack to middle mouse button.

the script would be something like this i wonder:

Code:

[ENABLE]
function speedhacked(sender)
speedhack_setSpeed(0.35)

return true
end

hkey=createHotkey("speedhacked",VK_middlemousebutton)
generichotkey_onHotkey(hkey,speedhacked)

[DISABLE]

speedhack_setSpeed(1)


sorry if my code and logic is horribly wrong. i just started few hours ago. please help me Crying or Very sad

TL;DR

generic trainer > hotkey bind speedhack in lua > dont know where to create script and add to trainer > also dont know keycodes for hotkeys.
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