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 regarding openFileAsProcess

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

Joined: 07 Mar 2021
Posts: 3

PostPosted: Sat Mar 20, 2021 6:58 pm    Post subject: Question regarding openFileAsProcess Reply with quote

Hi,
im loading a memory dump file, mounted via MemprocFS (github com/ufrisk/MemProcFS) using dma hardware.

This file is basically the memory of a process on another pc. I can scan this file with CE, but it looks like the memory doesent change in it when i re-scan, so i assume CE initially takes a snapshot of it and doesent register changes.

I found a lua function named openFileAsProcess, can i use this to well, open a file and handle it as a process?

When i execute this script i expect that CE opens a "process", but nothing happens...
Code:
function Connect()
FileName="S:\\name\\snes9x-x64.exe-3792\\minidump\\minidump.dmp"
openFileAsProcess(FileName,true)
end


Screenshot:
i.imgur com/ItqGwMw.png

Am i doing it wrong, or does "openFileAsProcess" not what i think it does?!
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 198

Joined: 25 Jan 2006
Posts: 8516
Location: 127.0.0.1

PostPosted: Sat Mar 20, 2021 8:05 pm    Post subject: Reply with quote

You wrapped the call in a function and never call the function.
Add:
Code:

Connect();


After what you've pasted above and see if you get any errors etc.

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
m1ndgames_AI
How do I cheat?
Reputation: 0

Joined: 07 Mar 2021
Posts: 3

PostPosted: Sat Mar 20, 2021 8:37 pm    Post subject: Reply with quote

atom0s wrote:
You wrapped the call in a function and never call the function.
Add:
Code:

Connect();


After what you've pasted above and see if you get any errors etc.


Thanks! Now the script is executed.

Unfortunately it doesent look like CE is updating any values. Before blaming CE on this, i have to verify the memory dump is infact updated in realtime by memprocfs.
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: Sun Mar 21, 2021 3:14 am    Post subject: This post has 1 review(s) Reply with quote

openFileAsProcess reads the full file once in memory. To scan for changes you have to call it again

if you want it realtime you have to write a filemap wrapper for the readprocessmemory api (ce exposes that function pointer and is easily swapped)

_________________
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
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