This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Lithia's profile picture

More Programming Languages?

Started by Lithia, 27 September 2012 - 10:00 AM
Lithia #1
Posted 27 September 2012 - 12:00 PM
Hey :P/>/>
Wouldent it be nice if Computercraft Had a Option To Accept Multiple Scripting languages?

Such as
Batch, Html ect

For People Who aren't Use to Lua

or at least an API For Batch script?

It would be easier for Beginners To write Easy Simple Programs
this will also Make a possibility of Background Processes ect?

Even a HTML kind of Thing To Make Clickable buttons on the screen? to make GUI's

I want to make my Computers Super advanced :3
DarkSnake #2
Posted 27 September 2012 - 12:14 PM
No. CC = Lua only.
Also, Pony spotted.
immibis #3
Posted 27 September 2012 - 12:15 PM
HTML is not a programming language.
Batch is just running a sequence of shell commands, one after the other. You can't do much with CC shell commands.

Edit: Here's your batch interpreter (untested):

local args = {...}
if #args ~= 1 then
 print("Usage: "..shell.getRunningProgram().." <filename>")
 return
end
local f = fs.open(args[1], "r")
if not f then
 print("Unable to open "..args[1])
 return
end
for line in f.readLine do
 local words = {}
 for w in string.gmatch(sLine, "[^ t]+") do
  table.insert(words, w)
 end
 if words[1] then
  shell.run(unpack(words))
 end
end
f.close()
Lithia #4
Posted 27 September 2012 - 12:34 PM
HTML is not a programming language.
Batch is just running a sequence of shell commands, one after the other. You can't do much with CC shell commands.

Edit: Here's your batch interpreter (untested):

local args = {...}
if #args ~= 1 then
print("Usage: "..shell.getRunningProgram().." <filename>")
return
end
local f = fs.open(args[1], "r")
if not f then
print("Unable to open "..args[1])
return
end
for line in f.readLine do
local words = {}
for w in string.gmatch(sLine, "[^ t]+") do
  table.insert(words, w)
end
if words[1] then
  shell.run(unpack(words))
end
end
f.close()

Well atleast Some HTML support "Which is what i meant"

And Thanks for the Script ill try it out

Also is there a way to Run Scripts in the backround?
matejdro #5
Posted 27 September 2012 - 02:17 PM
Here is HTML support:

http://www.computercraft.info/forums2/index.php?/topic/4420-wipbasic-html-reader/
Sebra #6
Posted 28 September 2012 - 07:13 PM
Hey :P/>/>
Wouldent it be nice if Computercraft Had a Option To Accept Multiple Scripting languages?

Such as
Batch, Html ect

For People Who aren't Use to Lua

or at least an API For Batch script?

It would be easier for Beginners To write Easy Simple Programs
this will also Make a possibility of Background Processes ect?

Even a HTML kind of Thing To Make Clickable buttons on the screen? to make GUI's

I want to make my Computers Super advanced :3
Hi! :D/>/>
All such ways are not for beginners. B)/>/>
To accompany html likk there are batch turtle in Apperture Science. Check Peripherals section.
Lua is quite an easy language to learn. Look for Direwolf20 tutorials.
There is a parallel API and even advanced version on forum but that is not easy.
Clickable buttons seems to be forbidden by Dan200. But check Peripherals again. :)/>/> And GUI on symbol screen is a bad idea. Rethink.
Make Computers behave advanced, not look advanced. B)/>/>
Good Luck !!!
D3matt #7
Posted 28 September 2012 - 08:33 PM
HTML is not a programming language.
Batch is just running a sequence of shell commands, one after the other. You can't do much with CC shell commands.

Edit: Here's your batch interpreter (untested):

local args = {...}
if #args ~= 1 then
print("Usage: "..shell.getRunningProgram().." <filename>")
return
end
local f = fs.open(args[1], "r")
if not f then
print("Unable to open "..args[1])
return
end
for line in f.readLine do
local words = {}
for w in string.gmatch(sLine, "[^ t]+") do
  table.insert(words, w)
end
if words[1] then
  shell.run(unpack(words))
end
end
f.close()

Well atleast Some HTML support "Which is what i meant"

And Thanks for the Script ill try it out

Also is there a way to Run Scripts in the backround?
HTML support? CC is not a browser. That's like asking windows to support HTML. You can throw HTML at windows all you want and it won't know what to do. You use a program in windows to view HTML, called Internet Explorer.
robhol #8
Posted 29 September 2012 - 06:43 PM
I don't even…. batch is horrible, and HTML isn't a programming language by any stretch of the imagination. Lua is not a difficult language to learn.
dimitriye98 #9
Posted 01 October 2012 - 06:04 AM
–Snip
HTML support? CC is not a browser. That's like asking windows to support HTML. You can throw HTML at windows all you want and it won't know what to do. You use a program in windows to view HTML, called Internet Explorer.
You don't use internet explorer to browse the internet. IE is a very basic program whose only purpose it to download a real browser like Firefox or Chrome.
Cranium #10
Posted 01 October 2012 - 05:20 PM
You don't use internet explorer to browse the internet. IE is a very basic program whose only purpose it to download a real browser like Firefox or Chrome.
Tell that to large companies. It seems that they are stuck forcing their employees into astounding depths of knowledge of Windows XP and Internet Explorer.

-Cranium
–Written from Internet Explorer on a Windows XP workstation…
D3matt #11
Posted 01 October 2012 - 05:48 PM
–Snip
HTML support? CC is not a browser. That's like asking windows to support HTML. You can throw HTML at windows all you want and it won't know what to do. You use a program in windows to view HTML, called Internet Explorer.
You don't use internet explorer to browse the internet. IE is a very basic program whose only purpose it to download a real browser like Firefox or Chrome.
Internet explorer is used by many parts of Windows to display HTML. Troll elsewhere.