Skip to content

Instantly share code, notes, and snippets.

Last active Aug 1, 2017
What would you like to do?
Learning some OpenComputers API
local component = require("component");
local sides = require("sides");
local ica = component.inventory_controller.address;
print("ICA: " .. ica)
local proxy = component.proxy(ica);
--Lets try to find our inventories
-- Top is the source
-- East is the output
print("Source inventory size: " .. proxy.getInventorySize(;
-- Lets get all stacks from the inventory slots in Source
for i=0,proxy.getInventorySize( do
local item = proxy.getStackInSlot(, i)
if item == nil then
print("No item in slot " .. i);
print(item.size .. " of " .. .. " - " ..;
print("all done!");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment