Difference between revisions of "Lua:process"

From Cheat Engine
Jump to navigation Jump to search
(Related Variables)
(Replaced content with '<span style="font-size:25px;color:red">Sorry! Content not available.</span>')
Line 1: Line 1:
[[Category:Lua]]
+
<span style="font-size:25px;color:red">Sorry! Content not available.</span>
'''global variable''' process
 
 
 
'''type''' (nil, string)
 
 
 
A variable that contains the main module name of the currently opened process
 
 
 
 
 
== Examples ==
 
When '''not attached''' to any process:
 
 
 
Code:
 
print(type(process))
 
print(process)
 
print('Attached to ' .. (process or 'NOTHING'))
 
if process then
 
  print('attached')
 
else
 
  print('Not Attached')
 
end
 
Output:
 
nil
 
&nbsp;
 
Attached to NOTHING
 
Not Attached
 
 
 
With the same code as above and '''attached''' to the '''''Cheat Engine Tutorial (64-Bit)''''':
 
 
 
Output:
 
string
 
Tutorial-x86_64.exe
 
Attached to Tutorial-x86_64.exe
 
attached
 
 
 
Note: If attached, and the attached process closes the "process" variable will still contain the last attached process' main module name. But "readInteger(process)" can be used.
 
if process ~= nil and readInteger(process) ~= nil then
 
  print('Attached to ' .. process)
 
end
 
 
 
 
 
== See also ==
 
* [[Lua]]
 
* [[Help_File:Script_engine|Script engine]]
 
 
 
=== Related Variables ===
 
* [[Lua:dbk_NtOpenProcess|dbk_NtOpenProcess]]
 
* [[Lua:TrainerOrigin|TrainerOrigin]]
 
 
 
=== Related Functions ===
 
* [[Lua:getProcesslist|getProcesslist]]
 
* [[Lua:getOpenedProcessID|getOpenedProcessID]]
 
* [[Lua:getProcessIDFromProcessName|getProcessIDFromProcessName]]
 
* [[Lua:openProcess|openProcess]]
 
* [[Lua:getForegroundProcess|getForegroundProcess]]
 
* [[Lua:getWindowProcessID|getWindowProcessID]]
 
* [[Lua:createProcess|createProcess]]
 
* [[Lua:debugProcess|debugProcess]]
 
* [[Lua:dbk_useKernelmodeOpenProcess|dbk_useKernelmodeOpenProcess]]
 
* [[Lua:dbk_useKernelmodeProcessMemoryAccess|dbk_useKernelmodeProcessMemoryAccess]]
 
* [[Lua:dbk_getPEProcess|dbk_getPEProcess]]
 

Revision as of 16:09, 16 March 2019

Sorry! Content not available.