| View previous topic :: View next topic |
| Author |
Message |
dark1337 How do I cheat?
Reputation: 0
Joined: 18 Jul 2018 Posts: 8 Location: 1337
|
Posted: Tue Jul 24, 2018 7:46 am Post subject: Change label when attach process |
|
|
How i make when attach game.exe
the label non active will be active
| Description: |
|
| Filesize: |
1.09 KB |
| Viewed: |
3751 Time(s) |

|
|
|
| Back to top |
|
 |
TheyCallMeTim13 Wiki Contributor
Reputation: 51
Joined: 24 Feb 2017 Posts: 976 Location: Pluto
|
Posted: Tue Jul 24, 2018 7:54 am Post subject: |
|
|
You can set the label text in "onOpenProcess", but I think I saw something about a new one to use instead ("OnProcessOpened").
https://wiki.cheatengine.org/index.php?title=Lua:onOpenProcess
From "celua.txt"
| Code: |
function onOpenProcess(processid):
If this function is defined it will be called whenever cheat engine opens a process.
Note: The the same process might be opened multiple times in a row internally
Note 2: This function is called before attachment is fully done. You can call reinitializeSymbolhandler() to force the open to complete, but it will slow down process opens. Alternatively, you could launch a timer which will run when the opening has finished
MainForm.OnProcessOpened: function(processid, processhandle, caption) - Define this if you want to be notified when a new process has been opened. Called only once from the main thread. It is recommended to use this instead of onOpenProcess |
_________________
|
|
| Back to top |
|
 |
dark1337 How do I cheat?
Reputation: 0
Joined: 18 Jul 2018 Posts: 8 Location: 1337
|
Posted: Tue Jul 24, 2018 8:17 am Post subject: |
|
|
| TheyCallMeTim13 wrote: | You can set the label text in "onOpenProcess", but I think I saw something about a new one to use instead ("OnProcessOpened").
From "celua.txt"
| Code: |
function onOpenProcess(processid):
If this function is defined it will be called whenever cheat engine opens a process.
Note: The the same process might be opened multiple times in a row internally
Note 2: This function is called before attachment is fully done. You can call reinitializeSymbolhandler() to force the open to complete, but it will slow down process opens. Alternatively, you could launch a timer which will run when the opening has finished
MainForm.OnProcessOpened: function(processid, processhandle, caption) - Define this if you want to be notified when a new process has been opened. Called only once from the main thread. It is recommended to use this instead of onOpenProcess |
|
thank for help but i dont understand
_________________
a new new newbie ce user |
|
| Back to top |
|
 |
jgoemat Master Cheater
Reputation: 23
Joined: 25 Sep 2011 Posts: 264
|
Posted: Tue Jul 24, 2018 7:54 pm Post subject: |
|
|
Create a table script that will run when your table is loaded and add this function:
| Code: | function onOpenProcess(processid)
-- here a new process has been opened,
-- so change the label with code here
end |
You should probably also store the old value and call it since I think it that function is just called and you will override the old one, such as the one in the mono lua code that enables the mono menu on attaching...
| Code: | saved = saved or {} -- create new var IF DOESN'T EXIST
if saved.OLD_onOpenProcess == nil then saved.OLD_onOpenProcess = onOpenProcess end
[code]function onOpenProcess(processid)
-- here a new process has been opened,
-- so change the label with code here
if saved.OLD_onOpenProcess then
saved.OLD_onOpenProcess(processid)
end
end[/code]
|
|
|
| Back to top |
|
 |
TheyCallMeTim13 Wiki Contributor
Reputation: 51
Joined: 24 Feb 2017 Posts: 976 Location: Pluto
|
Posted: Wed Jul 25, 2018 6:50 am Post subject: |
|
|
The new one for CE 6.8 seems to be "OnProcessOpened".
| Code: | MainForm.OnProcessOpened = function(processId, processHandle, caption)
-- Body
end |
| Quote: | | Define this if you want to be notified when a new process has been opened. Called only once from the main thread. It is recommended to use this instead of "onOpenProcess". |
| dark1337 wrote: | ...
thank for help but i dont understand |
Very Leet of you my friend.
_________________
|
|
| Back to top |
|
 |
Corroder Grandmaster Cheater Supreme
Reputation: 75
Joined: 10 Apr 2015 Posts: 1668
|
Posted: Wed Jul 25, 2018 11:37 am Post subject: |
|
|
I think dark1337 ask about change label actve / non active when game process attached, not about automate activating hack codes when game process attached.
Many ways to go China....
little example :
| Code: | f = createForm()
lb1 = createLabel(f)
lb1.left = 10
lb1.top = 10
lb1.font.color = '0x000000'
lb1.caption = 'Active Trainer'
lb2 = createLabel(f)
lb2.left = 100
lb2.top = 10
lb2.font.color = '0x000000'
lb2.caption = 'Non Active'
function getProcessNameFromID(processId)
local processName = nil
local list = createStringlist()
getProcesslist(list)
for i = 0, list.Count-1 do
local id, name = list.String[i]:match("(.*)-(.*)")
if processId == tonumber(id, 16) then
processName = name
break
end
end
return processName
end
function checkWhenOpen()
openProcess('firefox.exe') ---- game process name here
local id = getOpenedProcessID()
local name = getProcessNameFromID(id)
print(id,name)
if name == 'firefox.exe' then ---- game process name here
lb1.font.color = '0x4631FB'
lb1.caption = 'Active Trainer'
lb2.font.color = '0x000000'
lb2.caption = 'Non Active'
else
lb2.font.color = '0x4631FB'
lb2.caption = 'Non Active'
lb1.font.color = '0x000000'
lb1.caption = 'Active Trainer'
end
end
f.OnShow = checkWhenOpen()
|
_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL |
|
| Back to top |
|
 |
MateeJr GT Advanced Cheater
Reputation: 0
Joined: 24 Dec 2017 Posts: 66
|
Posted: Thu Jul 26, 2018 7:25 am Post subject: |
|
|
xD, I Have just Super Simplest Script
here :
| Code: |
if openProcess("--Your Game.exe") then
UDF1.CELabel1.Caption = "Attached"
else
UDF1.CELabel1.Caption = "not attached"
end
end |
NOTE : --Your Game.exe =Your game process, example : Growtopia.exe
_________________
Hi Lynxz Gaming |
|
| Back to top |
|
 |
dark1337 How do I cheat?
Reputation: 0
Joined: 18 Jul 2018 Posts: 8 Location: 1337
|
Posted: Mon Jul 30, 2018 6:12 am Post subject: |
|
|
| MateeJr Gaming wrote: | xD, I Have just Super Simplest Script
here :
| Code: |
if openProcess("--Your Game.exe") then
UDF1.CELabel1.Caption = "Attached"
else
UDF1.CELabel1.Caption = "not attached"
end
end |
NOTE : --Your Game.exe =Your game process, example : Growtopia.exe |
thank
_________________
a new new newbie ce user |
|
| Back to top |
|
 |
|