View previous topic :: View next topic |
Author |
Message |
Dark Byte Site Admin Reputation: 457
Joined: 09 May 2003 Posts: 25262 Location: The netherlands
|
Posted: Mon Jan 10, 2011 5:36 pm Post subject: auto attach to process |
|
|
The following script will auto attach cheat engine to the Tutorial process.
You can change it to any other process you like and put it in the Lua section of your cheat table so when your table is loaded it will automatically open the correct process
Code: |
aalist=getAutoAttachList()
stringlist_add(aalist,"Tutorial-i386.exe");
|
Alternatively, you could do
Code: |
OpenProcess("Tutorial-i386.exe")
|
But that will only work when the game has already been started as oposed to the autoattach which will also attach when the game has not yet been started.
There can be a max delay of 2 seconds between adding the item to the list or openening of the process and ce attaching to the process
_________________
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 |
|
|
Geri Moderator Reputation: 111
Joined: 05 Feb 2010 Posts: 5636
|
Posted: Mon Jan 10, 2011 5:48 pm Post subject: |
|
|
Thank You, very useful info. Tested and working.
_________________
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 457
Joined: 09 May 2003 Posts: 25262 Location: The netherlands
|
Posted: Mon Jan 10, 2011 6:09 pm Post subject: |
|
|
An alternative way faster auto attach (also a little bit more complex)
Code: |
function myattach(timer)
if getProcessIDFromProcessName("Tutorial-i386.exe") ~= nil then
object_destroy(timer)
openProcess("Tutorial-i386.exe")
end
end
t=createTimer(nil);
timer_setInterval(t,10)
timer_onTimer(t,myattach)
|
What it does is create a timer, set the interval to 10 milliseconds, and each interval it checks if the process exists and if so open it and destroy the timer
_________________
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 |
|
|
Geri Moderator Reputation: 111
Joined: 05 Feb 2010 Posts: 5636
|
Posted: Mon Jan 10, 2011 7:08 pm Post subject: |
|
|
Hm, this isn't working for me. If I execute the script after the tutorial has started, it will not be attached.
And if I run this script before I would start the tutorial, it will show the "Successfully executed" window but I cannot close it whatever I do.
_________________
|
|
Back to top |
|
|
mgr.inz.Player I post too much Reputation: 218
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
Posted: Mon Jan 10, 2011 7:31 pm Post subject: Re: auto attach to process |
|
|
Dark Byte wrote: |
Code: |
aalist=getAutoAttachList()
stringlist_add(aalist,"Tutorial-i386.exe")
|
|
Works fine, but
There's an annoying "confirmation" window (keep the current address list/code list?).
1) when loaded (double click on .ct file)
2) when loaded (opened with ctrl-O )
weird because there wasn't other addess/code list.
_________________
|
|
Back to top |
|
|
Geri Moderator Reputation: 111
Joined: 05 Feb 2010 Posts: 5636
|
Posted: Mon Jan 10, 2011 7:41 pm Post subject: Re: auto attach to process |
|
|
mgr.inz.Player wrote: | Dark Byte wrote: |
Code: |
aalist=getAutoAttachList()
stringlist_add(aalist,"Tutorial-i386.exe")
|
|
Works fine, but
There's an annoying "confirmation" window (keep the current address list/code list?).
1) when loaded (double click on .ct file)
2) when loaded (opened with ctrl-O )
weird because there wasn't other addess/code list. |
Guess this window opens because You have a lua script too in the table.
Or I don't know. It is not doing it for me.
_________________
|
|
Back to top |
|
|
mgr.inz.Player I post too much Reputation: 218
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
Posted: Mon Jan 10, 2011 8:17 pm Post subject: Re: auto attach to process |
|
|
Geri wrote: | Guess this window opens because You have a lua script too in the table. |
Of course it's in CT, inside "table extras" at "Lua Script" tab.
My mistake - "weird because there wasn't other addess/code list."
I meant "process from the list."
This confirmation window appears when we change(attach) from one process to another. And should be shown in this case only, I think.
_________________
Last edited by mgr.inz.Player on Mon Jan 10, 2011 8:39 pm; edited 1 time in total |
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 457
Joined: 09 May 2003 Posts: 25262 Location: The netherlands
|
Posted: Mon Jan 10, 2011 8:39 pm Post subject: |
|
|
that script works on windows 7. Perhaps opened the wrong process? (e.g 5.6's version)
if it's an xp thing and it doesn't like timers without windows then try:
Code: |
function myattach(timer)
if getProcessIDFromProcessName("Tutorial-i386.exe") ~= nil then
object_destroy(timer)
openProcess("Tutorial-i386.exe")
end
end
f=createForm(false) --create an invisible window
t=createTimer(f);
timer_setInterval(t,100) --10 might have been too fast for xp...
timer_onTimer(t,myattach)
|
also, I've just uploaded a minor fix which removes that annoying popup when automatically opening a process (It was a big enough annoyance to warrant a new version, but not really that important that you have to redownload if you don't want to)
_________________
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 |
|
|
Geri Moderator Reputation: 111
Joined: 05 Feb 2010 Posts: 5636
|
Posted: Mon Jan 10, 2011 8:48 pm Post subject: |
|
|
No, it is still not working. I am sure I have opened the correct process even in the first case. I have checked the process name even to see that it is surely starting with capital T.
It is the Tutorial-i386.exe in the process list but the script is not attaching CE to the process. It says "Successfully executed" as usual but still not attached.
The first script that You have posted is working perfectly.
_________________
|
|
Back to top |
|
|
mgr.inz.Player I post too much Reputation: 218
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
Posted: Mon Jan 10, 2011 8:55 pm Post subject: |
|
|
Dark Byte wrote: | I've just uploaded a minor fix which removes that annoying popup when automatically opening a process.... |
getAutoAttachList() works great now, without confirmation window
btw
a) CT doble clicked, process attached immediately
b) CT opened , process attached after 2 seconds
Dark Byte wrote: |
Code: | function myattach(timer)
if getProcessIDFromProcessName("Tutorial-i386.exe") ~= nil then
object_destroy(timer)
openProcess("Tutorial-i386.exe")
end
end
f=createForm(false) --create an invisible window
t=createTimer(f);
timer_setInterval(t,100) --10 might have been too fast for xp...
timer_onTimer(t,myattach) |
|
timer_setInterval
10 - 50% cpu (1core) usage
100 - 25~30% cpu (1core) usage
whole script do not work (WinXP Pro SP3 32 bit). It attaches (looks like, because grayed out controls get activated) to process but then immediately drop (I think).
executed alone: openProcess("xrengine.exe") do not work too (only grayed out controls get activated)
I'm testing at STALKER:COP
//sorry for frequent edits
_________________
Last edited by mgr.inz.Player on Tue Jan 11, 2011 7:21 am; edited 2 times in total |
|
Back to top |
|
|
Geri Moderator Reputation: 111
Joined: 05 Feb 2010 Posts: 5636
|
Posted: Mon Jan 10, 2011 9:06 pm Post subject: |
|
|
Oh really. The second script is working. Partially at least.
CE will still display "No Process Selected" but in fact, it is attached to the process. I can scan in it etc. So kinda strange.
_________________
|
|
Back to top |
|
|
mgr.inz.Player I post too much Reputation: 218
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
Posted: Tue Jan 11, 2011 2:39 pm Post subject: |
|
|
Dark Byte wrote: | if it's an xp thing and it doesn't like timers without windows |
What I see, it isn't xp thing.
f=createForm(false); t=createTimer(f); works the same way as t=createTimer(nil);
openProcess("Tutorial-i386.exe"); This attach to process correctly, but informations placed in MainForm.ProcessLabel.caption are poor: "no process selected" or "processID-processID" (e.g 00000A0C-00000A0C) (SVN revision 671).
aalist=getAutoAttachList()
stringlist_add(aalist,"Tutorial-i386.exe")
Works great, and we get full information in MainForm.ProcessLabel.caption: processID-processName
timer_setInterval(t,50) less than 50 not recommended (WinXP SP3). Responsiveness drops drastically.
_________________
|
|
Back to top |
|
|
Dacnomania Expert Cheater Reputation: 1
Joined: 03 Sep 2010 Posts: 124
|
Posted: Tue Jan 11, 2011 4:12 pm Post subject: |
|
|
If you don't mind, How do I attach my trainer (I'm making one with cheat engine) to a process ?
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 457
Joined: 09 May 2003 Posts: 25262 Location: The netherlands
|
Posted: Tue Jan 11, 2011 4:51 pm Post subject: |
|
|
Just use the above script
As soon as your table is loaded the process will get attached when the process is started
If you want to know when the attach happens then use the second script, or use the first one in combination of onOpenProcess (declare that function and it will get called when a process is opened, including autoattach opens)
_________________
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 |
|
|
Dacnomania Expert Cheater Reputation: 1
Joined: 03 Sep 2010 Posts: 124
|
Posted: Tue Jan 11, 2011 4:59 pm Post subject: |
|
|
Nvm Someone helped me.
Last edited by Dacnomania on Tue Jan 11, 2011 5:13 pm; edited 1 time in total |
|
Back to top |
|
|
|