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 


How to use getProcesslist()?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
yazigegeda
Expert Cheater
Reputation: 0

Joined: 22 Jan 2019
Posts: 183

PostPosted: Fri Apr 12, 2019 11:20 pm    Post subject: How to use getProcesslist()? Reply with quote

I want to get a list of processes and then determine if there are two process names. If so, openprocess opens the latest process. What should I do?


1.png
 Description:
 Filesize:  18.15 KB
 Viewed:  2247 Time(s)

1.png


Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 471

Joined: 09 May 2003
Posts: 25833
Location: The netherlands

PostPosted: Sat Apr 13, 2019 12:08 am    Post subject: Reply with quote

openProcess() already opens the last process

anyhow,
Code:

for pid,name in ipairs(getProcessList()) do
   print(string.format("%x - %s", pid,name)
end

_________________
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
View user's profile Send private message MSN Messenger
yazigegeda
Expert Cheater
Reputation: 0

Joined: 22 Jan 2019
Posts: 183

PostPosted: Sat Apr 13, 2019 12:38 am    Post subject: help Reply with quote

Didn't it reflect after running? How is this used? Please teach me.


00.png
 Description:
 Filesize:  8.99 KB
 Viewed:  2229 Time(s)

00.png


Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 471

Joined: 09 May 2003
Posts: 25833
Location: The netherlands

PostPosted: Sat Apr 13, 2019 12:41 am    Post subject: Reply with quote

sorry, I wrote it on my phone so didn't test it, it should be
Code:

for pid,name in pairs(getProcessList()) do
   print(string.format("%x - %s", pid,name))
end


anyhow, to get the processlist in the order you want you need the stringlist version
Code:

sl=createStringList()
getProcessList(sl)
for i=0,sl.Count-1 do
  print(sl[i])
end

sl.destroy()

_________________
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
View user's profile Send private message MSN Messenger
yazigegeda
Expert Cheater
Reputation: 0

Joined: 22 Jan 2019
Posts: 183

PostPosted: Sat Apr 13, 2019 12:46 am    Post subject: help Reply with quote

Thank you so much!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine 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