GetInjectableResources
Returns all resource names currently available for code injection.
Syntax
Susano.GetInjectableResources() -> table
Parameters
None.
Return(s)
table: An array of resource name strings that are currently available for injection.
Behavior
Returns a list of resource names whose Lua VMs have been captured and are available for code injection via Susano.InjectResource().
Only resources that have been seen within the last 2.5 seconds are returned. Resources that have stopped or restarted will disappear from the list.
Use this to discover which resources are active before calling InjectResource.
Example(s)
-- List all injectable resources
local resources = Susano.GetInjectableResources()
for i, name in ipairs(resources) do
print(i, name)
end
-- Inject into the first available resource
local res = Susano.GetInjectableResources()
if #res > 0 then
Susano.InjectResource(res[1], "print('Hello!')")
end