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 


Openprocess problem.

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
Freiza
Grandmaster Cheater
Reputation: 22

Joined: 28 Jun 2010
Posts: 662

PostPosted: Sat Mar 10, 2012 11:31 am    Post subject: Openprocess problem. Reply with quote

if there are two process running with the same name. How do I attach it using openprocess?
Back to top
View user's profile Send private message Send e-mail
Innovation
Grandmaster Cheater
Reputation: 12

Joined: 14 Aug 2008
Posts: 617

PostPosted: Sat Mar 10, 2012 1:03 pm    Post subject: Reply with quote

openProcess can take either the process name or the process ID as a parameter.
Back to top
View user's profile Send private message
Freiza
Grandmaster Cheater
Reputation: 22

Joined: 28 Jun 2010
Posts: 662

PostPosted: Sat Mar 10, 2012 1:04 pm    Post subject: Reply with quote

My problem is when processname is not unique then?
and how do I know the processID till runtime?

I meant if there is two process running with same name it will cause ambiguity to which process to select.
Back to top
View user's profile Send private message Send e-mail
Innovation
Grandmaster Cheater
Reputation: 12

Joined: 14 Aug 2008
Posts: 617

PostPosted: Sat Mar 10, 2012 1:09 pm    Post subject: Reply with quote

Have a window of the process you want to open in the foreground, and call getForegroundProcess.
Back to top
View user's profile Send private message
Freiza
Grandmaster Cheater
Reputation: 22

Joined: 28 Jun 2010
Posts: 662

PostPosted: Sat Mar 10, 2012 1:11 pm    Post subject: Reply with quote

in that context. I think we should use getForegroundProcess(). Am I wrong?

Edit: okay you corrected it.
But then I have to tell my user to follow this steps.
Anyway I think it will solve my problem.

Thank You.
Back to top
View user's profile Send private message Send e-mail
atom0s
Moderator
Reputation: 198

Joined: 25 Jan 2006
Posts: 8517
Location: 127.0.0.1

PostPosted: Sat Mar 10, 2012 1:19 pm    Post subject: Reply with quote

Since CE doesn't expose anything for the process list you'll have to deal with CE attaching to whichever process it does first. CE loops the process list backward so the newest process with the given name will be the one CE attaches to.
_________________
- 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 -> 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