View previous topic :: View next topic |
Author |
Message |
sfvisfun Newbie cheater Reputation: 0
Joined: 25 Feb 2016 Posts: 20
|
|
Back to top |
|
|
sfvisfun Newbie cheater Reputation: 0
Joined: 25 Feb 2016 Posts: 20
|
Posted: Mon Jul 11, 2016 1:16 am Post subject: |
|
|
Anyone?
|
|
Back to top |
|
|
cooleko Grandmaster Cheater Reputation: 11
Joined: 04 May 2016 Posts: 717
|
Posted: Mon Jul 11, 2016 1:47 am Post subject: |
|
|
Link the thread!
|
|
Back to top |
|
|
hhhuut Grandmaster Cheater Reputation: 6
Joined: 08 Feb 2015 Posts: 607
|
Posted: Mon Jul 11, 2016 3:45 am Post subject: |
|
|
Probably some Lua is needed for that because the process with the most threads is the one you want to attach the trainer to ...
|
|
Back to top |
|
|
sfvisfun Newbie cheater Reputation: 0
Joined: 25 Feb 2016 Posts: 20
|
|
Back to top |
|
|
cooleko Grandmaster Cheater Reputation: 11
Joined: 04 May 2016 Posts: 717
|
Posted: Mon Jul 11, 2016 6:24 am Post subject: |
|
|
Code: | getProcesslist(): Returns a table with the processlist (pid - name )
getWindowlist(): Returns a table with the windowlist (pid - window caption )
getThreadlist(List): fills a List object with the threadlist of the currently opened process. Format: %x
|
Couple that with the forum post you found and the previous answers, and you can solve it
I'm betting, if you copy the window name, you can also just use the window list, so that is at least three solutions (Use the linked post but set count to 1, use the threadlist to check all process of same name, once three have been checked keep the largest one, or just find the pid of the window of your game, which will be the correct process)
|
|
Back to top |
|
|
sfvisfun Newbie cheater Reputation: 0
Joined: 25 Feb 2016 Posts: 20
|
Posted: Mon Jul 11, 2016 7:49 am Post subject: |
|
|
Hi, thanks for the reply, really appreciate it!
So i tried with the script from the other thread and CE is still opening the third process. This is what i did:
Code: | processname = 'StreetFighterV.exe'
function openRightProcess()
local processlist=createStringlist()
local count=0
local entry=nil
local name=nil
getProcesslist(processlist)
for i=0,strings_getCount(processlist)-1 do
entry = strings_getString(processlist,i)
name = entry:sub(10)
if name == processname then count = count + 1 end
end
object_destroy(processlist)
if count==1 then
timer_setEnabled(timer1,false)
openProcess(processname)
end
end
if timer1~=nil then object_destroy(timer1);timer1=nil;end --not needed in final release
timer1 = createTimer(nil,false)
timer_onTimer(timer1,openRightProcess)
timer_setInterval(timer1,1000)
timer_setEnabled(timer1,true)
|
Then i tried
Code: | getThreadlist(List) |
And i get:
Code: | Error:getThreadlist: the provided List object is not valid |
This is the first time i try to do something with CE so please bear with me
|
|
Back to top |
|
|
cooleko Grandmaster Cheater Reputation: 11
Joined: 04 May 2016 Posts: 717
|
Posted: Mon Jul 11, 2016 6:08 pm Post subject: |
|
|
The list needs to be one you created
I think it is supposed to look like:
Code: |
getProcesslist(processlist)
thumb through the list
openProcess(processname)
processname.getThreadlist(list)
save the pid and the threadcount
end
pid is largest of the threadcounts
open the newly found process |
or something similar, You can find the function in the main.lua (CE install folder) and it will tell you how to use it there (is it a method/function, etc)
I didnt look, just guessing,
|
|
Back to top |
|
|
sfvisfun Newbie cheater Reputation: 0
Joined: 25 Feb 2016 Posts: 20
|
Posted: Mon Jul 11, 2016 11:35 pm Post subject: |
|
|
Thanks for the reply. However i get "undefined lua error" when i try.
Maybe this is just not possible to do? I found a lot of threads of people asking and explaining how to force CE to open some specific process, specially on chrome/flash but havent seen anyone trying to open the first one.
I will keep searching tho, thanks!
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25296 Location: The netherlands
|
Posted: Tue Jul 12, 2016 3:08 am Post subject: |
|
|
your first script was close but instead of opening the processid, you open the processname
instead of count=count+1 just call openProcess there with the pid (as a number) and then just break out of the loop
_________________
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 |
|
|
sfvisfun Newbie cheater Reputation: 0
Joined: 25 Feb 2016 Posts: 20
|
Posted: Tue Jul 12, 2016 7:05 am Post subject: |
|
|
Heya thanks for your reply! : )
So this is what i did but it doesn't work after i restart the game because the PID changes:
Code: | openProcess(tonumber(9840))
function openRightProcess()
local processlist=createStringlist()
local count=0
local entry=nil
local name=nil
getProcesslist(processlist)
for i=0,strings_getCount(processlist)-1 do
entry = strings_getString(processlist,i)
name = entry:sub(10)
if name == processname then openProcess(tonumber(9840))
end
end
end | [/code]
|
|
Back to top |
|
|
Zanzer I post too much Reputation: 126
Joined: 09 Jun 2013 Posts: 3278
|
Posted: Tue Jul 12, 2016 7:30 am Post subject: |
|
|
edit: Woops, forgot to exit the loop.
Code: | function openRightProcess()
local processlist = createStringlist()
getProcesslist(processlist)
local count = processlist.Count - 1
for i = 0, count do
local entry = processlist[i]
local index = entry:find("-", 1, true)
local name = entry:sub(index + 1)
local id = entry:sub(1, index - 1)
if name == processname then
openProcess(tonumber(id))
return
end
end
end |
Last edited by Zanzer on Tue Jul 12, 2016 9:53 am; edited 1 time in total |
|
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 Jul 12, 2016 9:21 am Post subject: |
|
|
@sfvisfun, that openRightProcess in other thread is not universal. It was designed to wait for two processes and then open the last one (openProcess(name) opens last one)
Try this one:
Code: | function openRightProcess(processname,howmanyprocesses,whichprocess)
local processlist=createStringlist()
local timer = createTimer(nil)
timer.Interval = 1000
timer.OnTimer =
function (t)
local tmp={}
getProcesslist(processlist)
for i=0,processlist.Count-1 do
if processlist[i]:sub(10):lower() == processname:lower()
then tmp[1+#tmp]=tonumber(processlist[i]:sub(1,8),16) end
end
if #tmp>=howmanyprocesses then
processlist.destroy()
t.destroy()
openProcess(tmp[whichprocess])
end
end
end
-- openRightProcess(string processname, integer howmanyprocesses, integer whichprocess)
-- howmanyprocesses = 3 means it will wait for 3 processes with the same name
-- whichprocess = 1 means first one, whichprocess = 2 means second one
openRightProcess('StreetFighterV.exe',3,1)
|
_________________
|
|
Back to top |
|
|
sfvisfun Newbie cheater Reputation: 0
Joined: 25 Feb 2016 Posts: 20
|
Posted: Tue Jul 12, 2016 1:44 pm Post subject: |
|
|
Thanks a lot for the replies guys, working excellent now! You guys rock!
|
|
Back to top |
|
|
|