Jump to content


IsaacTBeast's Content

There have been 81 items by IsaacTBeast (Search limited from 10-February 22)


By content type

See this member's


Sort by                Order  

#181836 Islx-app Another Minecraft Packaging too..

Posted by IsaacTBeast on 02 June 2014 - 06:03 AM in Programs

You can send your programs to the islx-app repo.



#181835 I feel stupid asking this but?

Posted by IsaacTBeast on 02 June 2014 - 06:01 AM in Ask a Pro

Tip: If there is not quotes on rs.setOutput(right,true) it means that your describing a variable but if you put quotes on both sides it means that your describing a string or the side of your rs output is.

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

Welcome to islx-app another minecraft packaging tool!
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

 Bomb Bloke, on 01 June 2014 - 11:35 AM, said:

Wait, what? That wasn't supposed to fix your specific error... :blink:

WHAT?!?!! xD... but thanks if thats not the answer.. but how do you if the application idoesn't exist in the repository?



#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:

92:

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!! :D and God Bless :)



#181539 how to do my logic?

Posted by IsaacTBeast on 31 May 2014 - 01:58 PM in Ask a Pro

View PostBomb Bloke, on 31 May 2014 - 01:17 PM, said:

Line 91 is blank in that version. Again, please provide the full error.

Thanks but I think I fixed it now I changed it.. and look at the link again..

But the error
line 92 attempt to index ? (a nil value)



#181523 how to do my logic?

Posted by IsaacTBeast on 31 May 2014 - 12:47 PM in Ask a Pro

any replies?



#181520 how to do my logic?

Posted by IsaacTBeast on 31 May 2014 - 12:07 PM in Ask a Pro

Here you go http://pastebin.com/d8KczPYV



#181512 how to do my logic?

Posted by IsaacTBeast on 31 May 2014 - 10:36 AM in Ask a Pro

View PostBomb Bloke, on 31 May 2014 - 07:10 AM, said:

At a glance, it looks like you've got an understanding of reading/writing files, creating directories and getting execution parameters already - I'm a little confused as to where exactly you're getting stuck?

This is the one......... I am stuck at downloading install using a argument..

View PostIsaacTBeast, on 31 May 2014 - 08:01 AM, said:

Can you guys help me?? I get an error called Unexpected String from number 91.

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

MY INTERNET IS SUCK A MAJOR LOSER -_-

Mine is 3 mbps but its raining so yeah the rain got my internet speed than my computer.. -_-

Posted Image



#181504 how to do my logic?

Posted by IsaacTBeast on 31 May 2014 - 08:01 AM in Ask a Pro

Can you guys help me?? I get an error called Unexpected String from number 91.

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

This is what I do so far :)

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

View Postapemanzilla, on 30 May 2014 - 03:32 PM, said:

...what are you trying to do, exactly?

I am trying to make a package manager and remake apt-get from debian to ComputerCraft but this is for my program that I am making now :)



#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

wow thanks Freack100



#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

View PostFreack100, on 30 May 2014 - 11:15 AM, said:

After looking at the wiki page I think it's like this:
--# 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

Hello guys! Can you help me make this logic? please :)

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

is this Linux? XD.. I am getting confused by programs that are based in GNU programs.. xD.. so commands from your Linux pc works in your real linux pc right even in CC xD?



#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

Ok?? but can you show me how to use the API?



#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

Hello guys! can you make a tutorial or suggest a tutorial to how to make a multitasking windows.. I want to make a movable window after the Window API has come out.. Please make a tutorial to teach me to the new api :)



#181262 How to make a text input to a file?

Posted by IsaacTBeast on 29 May 2014 - 03:17 PM in Ask a Pro

I know it Glass :) but I know it before I joined CC. :)



#181261 Key Event help?

Posted by IsaacTBeast on 29 May 2014 - 03:16 PM in Ask a Pro

Thank you guys :)



#181194 How to make a text input to a file?

Posted by IsaacTBeast on 29 May 2014 - 07:58 AM in Ask a Pro

Thank you anyways :(



#181193 Key Event help?

Posted by IsaacTBeast on 29 May 2014 - 07:56 AM in Ask a Pro

Hello guys :D can you tell me how to make my logic?

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

Where should I put the code to my program?



#181179 How to make a text input to a file?

Posted by IsaacTBeast on 29 May 2014 - 06:29 AM in Ask a Pro

it doesn't work :/

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.