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 


How to Enable/Disable a script from within auto assembly

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Tutorials -> Auto Assembler tutorials
View previous topic :: View next topic  
Author Message
raiderr1
How do I cheat?
Reputation: 0

Joined: 02 Oct 2017
Posts: 1

PostPosted: Wed Nov 28, 2018 5:28 pm    Post subject: How to Enable/Disable a script from within auto assembly Reply with quote

I'd like to be able to enable/disable a script from withing a code injection that I'm writing with the auto assembler. Is there a way to do this?

The reason I want to do this, is I want to enable/disable a script based on a game controller button press. I found the assembly code in memory that is running when I hold a button down and when I release it. So I'm hoping to inject some code into those two places that will enable/disable a different CE script.

Thank you
Back to top
View user's profile Send private message
OldCheatEngineUser
Whateven rank
Reputation: 20

Joined: 01 Feb 2016
Posts: 1586

PostPosted: Fri Nov 30, 2018 6:16 am    Post subject: Reply with quote

you probably need lua, and you may want another script to enable/disable the second script.

or from within the script you can use some lua code to allocate/free the allocated memory, but remember the script will be active and it will wait for a key press or so to re-allocate the memory.

the best thing to do is condition code (cc) in the first line of the script, you will need the following:
- allocate a byte or more
- register a symbol
- add the symbol to address-list
- assign a hotkey
- compare if the value is 0 if so exexute the original code (otherwise execute your own code)

_________________
About Me;
I Use CE Since Version 1.X, And Still Learning How To Use It Well!
Jul 26, 2020
STN wrote:
i am a sweetheart.
Back to top
View user's profile Send private message Visit poster's website
Roogue
Newbie cheater
Reputation: 0

Joined: 31 May 2019
Posts: 14

PostPosted: Fri Jun 07, 2019 8:28 pm    Post subject: Reply with quote

I think he was asking about the [ENABLE] / [DISABLE] sections in code injection

Get to the address where you want to make a code injection, press CTRL + A,
go to template -> Cheat table framework code and then go to template again and choose code injection.

Do your things, and once you executed your code go to file -> assign to current cheat table

You can now enable / disable your CE script if that was your question
Back to top
View user's profile Send private message
Billones142
How do I cheat?
Reputation: 0

Joined: 04 Jan 2023
Posts: 1

PostPosted: Wed Jan 04, 2023 10:53 pm    Post subject: Re: How to Enable/Disable a script from within auto assembly Reply with quote

raiderr1 wrote:
I'd like to be able to enable/disable a script from withing a code injection that I'm writing with the auto assembler. Is there a way to do this?

The reason I want to do this, is I want to enable/disable a script based on a game controller button press. I found the assembly code in memory that is running when I hold a button down and when I release it. So I'm hoping to inject some code into those two places that will enable/disable a different CE script.

Thank you


after some time i found it, no one understood you, i should be something like:
Code:
getAddressList().getMemoryRecordByDescription('*yourScriptDescription*').Active=*true/false*

hope it helped Very Happy

_________________
just trying to learn
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 Tutorials -> Auto Assembler tutorials 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