That's fairly basic if you just need to check that the process exists and set a label here's one way
Code:
-- set default caption assuming it won't be found
CETrainer.CELabel1.Caption = "Did not find 'whatever.exe' Process"
local pl = getProcessList()
for pid, name in pairs(pl) do
-- if found then set the caption
if name == "whatever.exe" then
CETrainer.CELabel1.Caption = "Found 'whatever.exe' process"
break -- stop looking/looping
end
end
Of course if you want it to be updated constantly then you'd need a timer to recheck it... though you could also just modify the default code that uses the autoattach list so that when it finds the process and attaches to it you change the label from saying "... waiting for <whatever.exe>" to "Ready!" or something. Should be as simple as
Code:
CETrainer.CELabel1.Caption = "... waiting for process"
function onOpenProcess(processid)
--call reinitializeSymbolhandler() to force the open to complete
reinitializeSymbolhandler()
CETrainer.CELabel1.Caption = "Ready!"
end
Though that won't update if you close the game and I don't think there's a simple "onProcessClosed" function that you can create either...
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