I' m trying to write a controll program for stargates from gregs sgcraft. I made one with all known adresses and a need to send this program to all Computers i use (dont want to update every computer manual if i add a new adress)
Is it possible to send hole programs? Or can i use an hdd with multiple Computers (and if thats possible, how could i access that hdd)
I made a program out of search results from google, many (MANY) lua wikis and a youtube tutorial. am i on the right way or is it just stupid?
shell = require("shell")
file = require("filesystem")
term = require("term")
local dir = shell.getWorkingDirectory()
local args, options = shell.parse(...)
-- this part reads the lines of a file and saves it in a table
if #args >= 1 then
doc = dir .. args[1]
print(doc)
reader = io.open(doc, 'r')
if reader ~= nil then
z = 1
x = {}
for line in reader:lines() do
x[z] = line
z = z + 1
end
reader:close()
end
end
-- this part takes the table and puts the stings back into a file
y = io.open(dir .. args[2], "w")
if y ~= nil then
for i in pairs(x) do
y:write(x[i], "\n")
end
y:close()
print("done")
else print("error")
end
right now it just takes the lines from one program to another on the same computer. i will use a modem to send it to another.
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
Hi.
I' m trying to write a controll program for stargates from gregs sgcraft.
I made one with all known adresses and a need to send this program to all Computers i use (dont want to update every computer manual if i add a new adress)
Is it possible to send hole programs?
Or can i use an hdd with multiple Computers (and if thats possible, how could i access that hdd)
I made a program out of search results from google, many (MANY) lua wikis and a youtube tutorial. am i on the right way or is it just stupid?
right now it just takes the lines from one program to another on the same computer. i will use a modem to send it to another.
or is there another way to do this?
Thanks
Edited by darthhoseLink to post
Share on other sites