Jump to content




[1.31+] NeXuS Command Prompt (NOW RUNS .BAT FILES)


6 replies to this topic

#1 ComputerCraftFan11

  • Members
  • 771 posts
  • LocationHawaii

Posted 17 May 2012 - 02:59 AM

This is my command prompt program, its supposed to simulate CMD/Batch (currently can't run batch files). This is the code:
Spoiler

Click here for Formatted/Pastebin version

DO NOT run "execute" or the program will error.
These are the basic commands:
echo --Prints whatever you type
exit --Exits the prompt
cmd --Opens a new prompt
pause --Pauses until you press a key
cls --Clears the screen
dir --Lists all the files
del --Deletes the file (easter egg inside)
execute --Runs the files as a .bat (the program will error on .io in line 3 after you run it. this is a bug)
title --Changes the title of the prompt, doesn't do anything yet but return what u typed

I'm trying to make this be exactly like cmd (or do all the commands you can do)
Copyright (c) NeXuS Corporation. All rights reserved.
Is just to make it look more realistic since the real CMD has this.

Known bugs:
  • Echo doesn't support spaces, so this code won't work:
    echo HELLO EVERYONE
    
    , it will just echo HELLO
    Fixed.
  • The application crashes after you execute a .batch


#2 ComputerCraftFan11

  • Members
  • 771 posts
  • LocationHawaii

Posted 18 May 2012 - 11:12 PM

Updated. This can now run .bat files and the echo not printing spaces fixed.

#3 BrettSmith21

  • New Members
  • 20 posts

Posted 27 May 2012 - 12:38 PM

can i use this in ...OS its my os

#4 ComputerCraftFan11

  • Members
  • 771 posts
  • LocationHawaii

Posted 27 May 2012 - 07:41 PM

View PostBrettSmith21, on 27 May 2012 - 12:38 PM, said:

can i use this in ...OS its my os

OK, but make sure you give credit or post a link

#5 Xemiru

  • Members
  • 38 posts

Posted 26 June 2012 - 08:36 AM

Now why do I feel like this can be more of a danger to CC servers, being able to excecute BATCH files from a virtual computer inside a game.

#6 Cloudy

    Ex-Developer

  • Members
  • 2,543 posts

Posted 26 June 2012 - 11:47 AM

Because you don't understand how this works. It doesn't execute bat files on the server. It executes files which run commands in the in game shell in order.

#7 ardera

  • Members
  • 503 posts
  • LocationGermany

Posted 26 June 2012 - 05:53 PM

Hey what about
:thisisapoint
and
goto
support or
if
and
set
support?





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users