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 


Question about memory editing in Python

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

Joined: 16 Nov 2020
Posts: 2

PostPosted: Mon Nov 16, 2020 7:22 am    Post subject: Question about memory editing in Python Reply with quote

Hello,
I am trying to recreate cheat engine in Python using ctypes and mem-edit.. I've already made some progress. The only thing that isnt working is the edit function. When I use it, I dont get any errors but the value doesnt change. Do I have to do something with the address to edit it?

Code:
Code:
 
import ctypes
from mem-edit import Process

pid = input("PID: ")
address = input("Address to edit: ")
value = input("New value: ")

with Process.open_process(pid) as p:
        p.write_memory(address, ctypes.c_ulong(int(value)))


Last edited by GG_u_tried_GG on Wed Nov 18, 2020 3:16 am; edited 2 times in total
Back to top
View user's profile Send private message
noor
How do I cheat?
Reputation: 0

Joined: 17 Nov 2020
Posts: 4
Location: Japan

PostPosted: Tue Nov 17, 2020 6:33 pm    Post subject: Reply with quote

are u seriously asking for help without providing any code?
nodody here can guess what u or ur code is doing dude

_________________
anti no code movement
Back to top
View user's profile Send private message
GG_u_tried_GG
How do I cheat?
Reputation: 0

Joined: 16 Nov 2020
Posts: 2

PostPosted: Wed Nov 18, 2020 3:17 am    Post subject: Reply with quote

noor wrote:
are u seriously asking for help without providing any code?
nodody here can guess what u or ur code is doing dude

Its in thread now
Back to top
View user's profile Send private message
noor
How do I cheat?
Reputation: 0

Joined: 17 Nov 2020
Posts: 4
Location: Japan

PostPosted: Thu Nov 19, 2020 3:26 pm    Post subject: Reply with quote

GG_u_tried_GG wrote:
noor wrote:
are u seriously asking for help without providing any code?
nodody here can guess what u or ur code is doing dude

Its in thread now


i'd use pymem instead, i havent used the library ur using

_________________
anti no code movement
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming 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