- ComputerCraft | Programmable Computers for Minecraft
- → IsaacTBeast's Content
IsaacTBeast's Content
There have been 81 items by IsaacTBeast (Search limited from 10-February 22)
#181836 Islx-app Another Minecraft Packaging too..
Posted by
IsaacTBeast
on 02 June 2014 - 06:03 AM
in
Programs
#181835 I feel stupid asking this but?
Posted by
IsaacTBeast
on 02 June 2014 - 06:01 AM
in
Ask a Pro
Heres the Logic of rs.setOutput(right, true):
local right = "right" local left = "left" rs.setOutput(right, true) rs.setOutput(left, true)
Heres the Logic with quotes:
rs.setOutput("right", true)
rs.setOutput("left", true)
#181832 Islx-app Another Minecraft Packaging too..
Posted by
IsaacTBeast
on 02 June 2014 - 05:12 AM
in
Programs
made by IsaacTBeast aka IsaacTBest.
The default repo of islx-app is on github..
Heres the URL:
https://github.com/iansapelino/islxcc/tree/master/Programs
You can send your apps in the repository..
to install apps on the repo just simply type:
islx-app install [Program Name]
If the application is not on the repository.. you can just simply type
islx-app pastebin-install [(Pastebin Id)] [(Program Name)]
or if you want to use pastebin to install the program..
there's a misc command too:
islx-app update islx-app add-repo --- Still in progress...
Download Islx-app here!:
pastebin get d8KczPYV islx-app
Some Screen Shots:
http://imgur.com/Jv3...jCn7geq,1xbJ8rJ
#181711 how to do my logic?
Posted by
IsaacTBeast
on 01 June 2014 - 11:42 AM
in
Ask a Pro
#181705 how to do my logic?
Posted by
IsaacTBeast
on 01 June 2014 - 11:10 AM
in
Ask a Pro
Bomb Bloke, on 01 June 2014 - 02:32 AM, said:
app.write(http.get( "https://raw.githubusercontent.com/iansapelino/islxcc/master/Programs/"..args[2] ).readAll())
You guys are misreading the error - an "attempt to index nil" doesn't mean that something like args[2] is nil, it means that something like args is nil. That can't be true, so presumably it doesn't like the attempt to index "readAll" from within "http.get()". Or "get" from within "http".
This could mean the http API isn't enabled, or that there's some other problem with the attempt to get the website handle.
It's a bad idea to do the "get" and the "read" on one line anyway. That means you don't retain the handle, which you should be closing after the read (impossible if you didn't keep the pointer):
local webHandle = http.get( "https://raw.githubusercontent.com/iansapelino/islxcc/master/Programs/"..args[2] ) app.write(webHandle.readAll()) webHandle.close()
Though I'm still suspecting the error is happening within some API this script is calling - I'd expect the full error to include information about the name of the file within which the error occurred.
THANK YOU!!
#181539 how to do my logic?
Posted by
IsaacTBeast
on 31 May 2014 - 01:58 PM
in
Ask a Pro
#181523 how to do my logic?
Posted by
IsaacTBeast
on 31 May 2014 - 12:47 PM
in
Ask a Pro
#181520 how to do my logic?
Posted by
IsaacTBeast
on 31 May 2014 - 12:07 PM
in
Ask a Pro
#181512 how to do my logic?
Posted by
IsaacTBeast
on 31 May 2014 - 10:36 AM
in
Ask a Pro
Bomb Bloke, on 31 May 2014 - 07:10 AM, said:
This is the one......... I am stuck at downloading install using a argument..
IsaacTBeast, on 31 May 2014 - 08:01 AM, said:
Heres my code.
local args = { ... }
local internet = {}
local installapplic = "/etc/applications"
local root = "/"
local etc = "/etc/applications/app"
--Credits to ApeManzilla
local function save(data,file)
local file = shell.resolve(file)
if not (fs.exists(string.sub(file,1,#file - #fs.getName(file))) and fs.isDir(string.sub(file,1,#file - #fs.getName(file)))) then
if fs.exists(string.sub(file,1,#file - #fs.getName(file))) then fs.delete(string.sub(file,1,#file - #fs.getName(file))) end
fs.makeDir(string.sub(file,1,#file - #fs.getName(file)))
end
local f = fs.open(file,"w")
f.write(data)
f.close()
end
--Credits to ApeManzilla
local function download(url, file)
save(http.get(url).readAll(),file)
end
--Credits to me.. xD
function printUsage()
print("Usage: \n islx-app update --updates the config file. \n islx-app oldconfig --downloads the oldconfig. \n islx-app add-repo --to add your repo.")
end
if #args < 1 then
printUsage()
end
--Main. This is what I create :)/>/>/>
local sCommand = args[1]
local sAppfname = args[2]
local repolink = args[2]
if sCommand == "update" then
if fs.isDir("/tmp") then
local fileH = http.get("https://raw.githubusercontent.com/iansapelino/islxcc/master/helloworld.lua")
write(fileH.readAll())
fileH.close()
sleep(0.5)
fs.delete("/tmp")
else
fs.makeDir("/tmp")
local fileH = http.get("https://raw.githubusercontent.com/iansapelino/islxcc/master/helloworld.lua")
write(fileH.readAll())
fileH.close()
sleep(0.5)
fs.delete("/tmp")
end
end
if sCommand == "oldconfig" then
if fs.isDir("/etc") then
if fs.exists("/etc/islxcc/islxcc.icfg") then
fs.delete("/etc/islxcc/islxcc.icfg")
term.clear()
term.setCursorPos(1,1)
print("Downloading the Old Config for the packages..")
sleep(0.5)
download("https://raw.githubusercontent.com/iansapelino/islxcc/master/islxcc.icfg", "/etc/islxcc/islxcc.icfg")
else
term.clear()
term.setCursorPos(1,1)
print("Downloading the Old Config for the packages..")
sleep(0.5)
download("https://raw.githubusercontent.com/iansapelino/islxcc/master/islxcc.icfg", "/etc/islxcc/islxcc.icfg")
end
else
fs.makeDir("/etc")
fs.makeDir("/etc/islxcc/")
term.clear()
term.setCursorPos(1,1)
print("Downloading the Old Config for the packages..")
sleep(0.5)
download("https://raw.githubusercontent.com/iansapelino/islxcc/master/islxcc.icfg", "/etc/islxcc/islxcc.icfg")
end
end
if sCommand == "add-repo" then
if fs.exists(tostring(repolink)) then
fs.makeDir(tostring(repolink))
fs.copy(tostring(repolink), "etc/"..args[2])
fs.delete(tostring(repolink))
else
fs.makeDir(tostring(repolink))
fs.copy(tostring(repolink), "etc/"..args[2])
fs.delete(tostring(repolink))
end
end
if sCommand == "install" then
download("https://raw.githubusercontent.com/iansapelino/islxcc/master/Programs/"..args[2], ..args[2])
end
This is the code..
I got stuck at islx-app install because it says that unexpected string at number line 91.
#181505 Post Your Internet Speed!
Posted by
IsaacTBeast
on 31 May 2014 - 08:11 AM
in
General
Mine is 3 mbps but its raining so yeah the rain got my internet speed than my computer..
#181504 how to do my logic?
Posted by
IsaacTBeast
on 31 May 2014 - 08:01 AM
in
Ask a Pro
Heres my code.
local args = { ... }
local internet = {}
local installapplic = "/etc/applications"
local root = "/"
local etc = "/etc/applications/app"
--Credits to ApeManzilla
local function save(data,file)
local file = shell.resolve(file)
if not (fs.exists(string.sub(file,1,#file - #fs.getName(file))) and fs.isDir(string.sub(file,1,#file - #fs.getName(file)))) then
if fs.exists(string.sub(file,1,#file - #fs.getName(file))) then fs.delete(string.sub(file,1,#file - #fs.getName(file))) end
fs.makeDir(string.sub(file,1,#file - #fs.getName(file)))
end
local f = fs.open(file,"w")
f.write(data)
f.close()
end
--Credits to ApeManzilla
local function download(url, file)
save(http.get(url).readAll(),file)
end
--Credits to me.. xD
function printUsage()
print("Usage: \n islx-app update --updates the config file. \n islx-app oldconfig --downloads the oldconfig. \n islx-app add-repo --to add your repo.")
end
if #args < 1 then
printUsage()
end
--Main. This is what I create :)/>
local sCommand = args[1]
local sAppfname = args[2]
local repolink = args[2]
if sCommand == "update" then
if fs.isDir("/tmp") then
local fileH = http.get("https://raw.githubusercontent.com/iansapelino/islxcc/master/helloworld.lua")
write(fileH.readAll())
fileH.close()
sleep(0.5)
fs.delete("/tmp")
else
fs.makeDir("/tmp")
local fileH = http.get("https://raw.githubusercontent.com/iansapelino/islxcc/master/helloworld.lua")
write(fileH.readAll())
fileH.close()
sleep(0.5)
fs.delete("/tmp")
end
end
if sCommand == "oldconfig" then
if fs.isDir("/etc") then
if fs.exists("/etc/islxcc/islxcc.icfg") then
fs.delete("/etc/islxcc/islxcc.icfg")
term.clear()
term.setCursorPos(1,1)
print("Downloading the Old Config for the packages..")
sleep(0.5)
download("https://raw.githubusercontent.com/iansapelino/islxcc/master/islxcc.icfg", "/etc/islxcc/islxcc.icfg")
else
term.clear()
term.setCursorPos(1,1)
print("Downloading the Old Config for the packages..")
sleep(0.5)
download("https://raw.githubusercontent.com/iansapelino/islxcc/master/islxcc.icfg", "/etc/islxcc/islxcc.icfg")
end
else
fs.makeDir("/etc")
fs.makeDir("/etc/islxcc/")
term.clear()
term.setCursorPos(1,1)
print("Downloading the Old Config for the packages..")
sleep(0.5)
download("https://raw.githubusercontent.com/iansapelino/islxcc/master/islxcc.icfg", "/etc/islxcc/islxcc.icfg")
end
end
if sCommand == "add-repo" then
if fs.exists(tostring(repolink)) then
fs.makeDir(tostring(repolink))
fs.copy(tostring(repolink), "etc/"..args[2])
fs.delete(tostring(repolink))
else
fs.makeDir(tostring(repolink))
fs.copy(tostring(repolink), "etc/"..args[2])
fs.delete(tostring(repolink))
end
end
if sCommand == "install" then
download("https://raw.githubusercontent.com/iansapelino/islxcc/master/Programs/"..args[2], ..args[4])
end
#181433 how to do my logic?
Posted by
IsaacTBeast
on 30 May 2014 - 05:02 PM
in
Ask a Pro
local args = { ... }
local internet = {}
local installapplic = "/etc/applications"
local root = "/"
local function save(data,file)
local file = shell.resolve(file)
if not (fs.exists(string.sub(file,1,#file - #fs.getName(file))) and fs.isDir(string.sub(file,1,#file - #fs.getName(file)))) then
if fs.exists(string.sub(file,1,#file - #fs.getName(file))) then fs.delete(string.sub(file,1,#file - #fs.getName(file))) end
fs.makeDir(string.sub(file,1,#file - #fs.getName(file)))
end
local f = fs.open(file,"w")
f.write(data)
f.close()
end
local function download(url, file)
save(http.get(url).readAll(),file)
end
function printUsage()
print("Usage: \n islx-app update --updates the config file. \n islx-app oldconfig --downloads the oldconfig. \n islx-app add-repo --to add your repo.")
end
if #args < 1 then
printUsage()
end
local sCommand = args[1]
local sAppfname = args[2]
local repolink = args[2]
if sCommand == "update" then
if fs.isDir("/tmp") then
local fileH = http.get("https://raw.githubusercontent.com/iansapelino/islxcc/master/helloworld.lua")
write(fileH.readAll())
fileH.close()
sleep(0.5)
fs.delete("/tmp")
else
fs.makeDir("/tmp")
local fileH = http.get("https://raw.githubusercontent.com/iansapelino/islxcc/master/helloworld.lua")
write(fileH.readAll())
fileH.close()
sleep(0.5)
fs.delete("/tmp")
end
end
if sCommand == "oldconfig" then
if fs.isDir("/etc") then
if fs.exists("/etc/islxcc/islxcc.icfg") then
fs.delete("/etc/islxcc/islxcc.icfg")
term.clear()
term.setCursorPos(1,1)
print("Downloading the Old Config for the packages..")
sleep(0.5)
download("https://raw.githubusercontent.com/iansapelino/islxcc/master/islxcc.icfg", "/etc/islxcc/islxcc.icfg")
else
term.clear()
term.setCursorPos(1,1)
print("Downloading the Old Config for the packages..")
sleep(0.5)
download("https://raw.githubusercontent.com/iansapelino/islxcc/master/islxcc.icfg", "/etc/islxcc/islxcc.icfg")
end
else
fs.makeDir("/etc")
fs.makeDir("/etc/islxcc/")
term.clear()
term.setCursorPos(1,1)
print("Downloading the Old Config for the packages..")
sleep(0.5)
download("https://raw.githubusercontent.com/iansapelino/islxcc/master/islxcc.icfg", "/etc/islxcc/islxcc.icfg")
end
end
if sCommand == "add-repo" then
fs.makeDir( "/etc/"..repolink )
end
#181418 how to do my logic?
Posted by
IsaacTBeast
on 30 May 2014 - 04:31 PM
in
Ask a Pro
#181403 Any tutorials to how to make a multitasking terminal and movable window?
Posted by
IsaacTBeast
on 30 May 2014 - 03:27 PM
in
Ask a Pro
#181401 Any tutorials to how to make a multitasking terminal and movable window?
Posted by
IsaacTBeast
on 30 May 2014 - 03:22 PM
in
Ask a Pro
Freack100, on 30 May 2014 - 11:15 AM, said:
--# you create a new window
--# with the actual term as parent terminal, it starts at 5,5 and ends at 15,8
local window1 = window.create(term,5,5,10,3)
--# write in the window
window1.write("Some Text")
--# As you can see, it's like the term API. The only difference is that you don't use term.*, you use window_name.*
--# you can also redirect to the window you've created
--# then you don't have to use window_name.* because then the term.* functions redirect to you window object
term.redirect(window1)
term.write("Some other text written using redirection")
Hope you understand it a bit better now ^^not working :/
#181398 how to do my logic?
Posted by
IsaacTBeast
on 30 May 2014 - 03:12 PM
in
Ask a Pro
This is my logic..
apt-get add-repo http://www.example.com/packages/ apt-get add-repo http://www.example2.com/packages/
It sets all the link in lines..
This is will happen.
http://www.example.com --> Line 1 of config.cfg
http://www.example2.com --> Line 2 of config.cfg
~~~~Another Logic~~~~~
This is my another logic:
apt-get install example apt-get install example2
This will happen if it runs the code:
apt-get install example <--- config.cfg and finds the app from the repos.
apt-get install example2 <--- dis-same as above.
~~~~Another Logic~~~
making a folder.
test.lua:
local sFile = args[1]
test.lua testfolder
and then the testfolder will go to /tmp/testfolder
#181391 MPT - Minecraft packaging tool
Posted by
IsaacTBeast
on 30 May 2014 - 02:29 PM
in
Programs
#181355 Any tutorials to how to make a multitasking terminal and movable window?
Posted by
IsaacTBeast
on 30 May 2014 - 06:08 AM
in
Ask a Pro
#181348 Any tutorials to how to make a multitasking terminal and movable window?
Posted by
IsaacTBeast
on 30 May 2014 - 04:58 AM
in
Ask a Pro
#181262 How to make a text input to a file?
Posted by
IsaacTBeast
on 29 May 2014 - 03:17 PM
in
Ask a Pro
#181261 Key Event help?
Posted by
IsaacTBeast
on 29 May 2014 - 03:16 PM
in
Ask a Pro
#181194 How to make a text input to a file?
Posted by
IsaacTBeast
on 29 May 2014 - 07:58 AM
in
Ask a Pro
#181193 Key Event help?
Posted by
IsaacTBeast
on 29 May 2014 - 07:56 AM
in
Ask a Pro
here is my logic..
This is the screen or print:
LOLS
EXIST
When you press Up arrow key
This will show up
LOLS <--
when you press down this will show up
EXISTS <--
by default you will see this
LOLS <--
Exists.
Please help me
#181191 How to make a text input to a file?
Posted by
IsaacTBeast
on 29 May 2014 - 07:29 AM
in
Ask a Pro
#181179 How to make a text input to a file?
Posted by
IsaacTBeast
on 29 May 2014 - 06:29 AM
in
Ask a Pro
function readLines(sPath)
local fHandle = fs.open(sPath, 'r')
if fHandle then
local tLines = {}
for sLine in fHandle.readLine do
tLines[#tLines+1] = sLine
end
fHandle.close()
return tLines
end
end
function writeLines(sPath, tLines)
local fHandle = fs.open(sPath, 'w')
if fHandle then
fHandle.writeLine(table.concat(tLines, '\n'))
fHandle.close()
end
end
function printUsage()
print("Usage: file [(OPTION)] [(File Name)]")
print("Usage: file -i [(File Name)] [(Text)]")
print(" ")
print("-find -- Is an option that finds a file.")
print(" ")
print("-o -- It shows the output of your file content.")
print("-i -- Write a Text to a made file.")
end
-- This program was created by IsaacTBest.
-- License: GNU/GPLv3 License.
-- Read GNU/GPLv3 License to know more about the laws.
local tArgs = { ... }
if #tArgs < 1 then
printUsage()
end
local sCommand = tArgs[1]
if sCommand == "-find" then
local sPath = shell.resolve( tArgs[2] )
local tFiles = fs.find( sPath )
if #tFiles > 0 then
for n,sFile in ipairs( tFiles ) do
if fs.exists( sFile ) then
print("File Exists!");
else
term.setTextColor(colors.red)
printError( "File does not exist!" )
end
end
else
printUsage()
end
end
if sCommand == "-o" then
local sPath = shell.resolve( tArgs[2] )
local tFiles = fs.find( sPath )
if #tFiles > 0 then
for n,sFile in ipairs( tFiles ) do
if fs.exists( sFile ) then
local file = fs.open( sFile,"r" )
print("Title of file: "..sFile)
print("Content:")
print(file.readAll( sFile ))
file.close()
else
term.setTextColor(colors.red)
print( "File does not exist!" )
end
end
end
end
if sCommand == "-i" then
local sPath = shell.resolve( tArgs[2] )
local tFiles = fs.find( sPath )
local tLines = shell.resolve ( tArgs[3] )
if #tFiles > 0 then
for n,sFile in ipairs( tFiles ) do
writeLines(sFile, tLines)
end
end
end
This is what I put.
- ComputerCraft | Programmable Computers for Minecraft
- → IsaacTBeast's Content


