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 


Auto Attach ?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
ups2000ups
I post too much
Reputation: 0

Joined: 31 Jul 2006
Posts: 2471

PostPosted: Thu Nov 08, 2007 2:27 am    Post subject: Auto Attach ? Reply with quote

if i whant my program auto attach process name "Sro_Client" how sould i write then?
well i know this thing down here dosent work but it shows what i mean

if listbox1.items = 'Sro_Client.exe' then
OpenProcess ('Sro_Client.exe');

i tryed to search at google cant find anything
the script on this site is for "process watcher" and dosent work for normal process list

_________________
dont complain about my english...
1*1 = 2?
Back to top
View user's profile Send private message
assaf84
Expert Cheater
Reputation: 0

Joined: 03 Oct 2006
Posts: 238

PostPosted: Thu Nov 08, 2007 2:37 am    Post subject: Reply with quote

Create a timer or a thread, and try getting the process ID in it. When it succeed, open the process.
Back to top
View user's profile Send private message
ups2000ups
I post too much
Reputation: 0

Joined: 31 Jul 2006
Posts: 2471

PostPosted: Thu Nov 08, 2007 2:40 am    Post subject: Reply with quote

assaf84 wrote:
Create a timer or a thread, and try getting the process ID in it. When it succeed, open the process.


thats not the problem the problem is how should the code look like that detect if "Sro_Client.exe" exist in the listbox (thats a noobie question but id remember how to find strings in list boxes)

and how should the
OpenProcess ('Sro_Client.exe'); look like

_________________
dont complain about my english...
1*1 = 2?
Back to top
View user's profile Send private message
assaf84
Expert Cheater
Reputation: 0

Joined: 03 Oct 2006
Posts: 238

PostPosted: Thu Nov 08, 2007 4:51 am    Post subject: Reply with quote

Search OpenProcess in MSDN, and search ListBox in www.delphibasics.co.uk
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Thu Nov 08, 2007 8:09 am    Post subject: Reply with quote

Looks like you are coding this in VB, heres a quick example I tossed together on how to check if the process is found.

EDIT::

As for OpenProcess, you need to set it up like this (using the source attached to this post, the API and constants are there already) you would need to, first ensure you are attached and have a valid process id, to do that just make sure CheckForProc returns true, and that dwProcId <> 0.

Next, make a function to do what you want and have OpenProcess setup like:

Code:
Private Function Attach()
    Dim pHandle As Long
   
    If CheckForProc("winmine.exe") = False Then Exit Function
    If dwProcId = 0 Then Exit Function
       
    pHandle = OpenProcess(PROCESS_ALL_ACCESS, False, dwProcId)
   
    '// Your Code Here
   
    CloseHandle pHandle
End Function



The Extension 'rar' was deactivated by an board admin, therefore this Attachment is not displayed.


_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
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