But how would you program in it? Btw could you upload a version of it? I'll try it, but make sure the space taken is low and you can program in it. But I can only do it in Python. If you can learn to program in that, that would help A LOT.
Offline
# This is the greeting. print \ """ Emerald 0.1 - Based on Scratch by MIT By Magnie """ commands = ["print","run","end","ask","save","load"] # Commands that you can type encode = [] # for print and ask commands encode2 = [] # for Variables onOrOff = "off" # I switch I never really knew what to call it. line = 0 # Just shows what line the Programming Language is accessing on the program i = 0 # Another switch program = [] # Where all the commands will be put. # Start while i != 1: while onOrOff == "off": # Add commands here command = raw_input("Type in a command: ") command.lower() if command != "run": if command == commands[0]: # Checks to see if it is print. recode = raw_input("What should your program print? ") # Allows you type type what you want for it to print. encode.append(recode) program.append(command) encode2.append(None) if command == commands[2]: # Checks to see if it's end. onOrOff = None # Makes it so you can't add a command and makes it so you can't run the program allowing it to close. i = 1 # Disables the whole script line = 9999 if command == commands[3]: # Checks to see if the command is Ask. recode = raw_input("What should you ask them? ") # Allows you to type what the 'question' is. encode.append(recode) program.append(command) encode2.append(None) if command == commands[4]: # Checks to see if the command is Save. print "Your program has been saved." open(Program.py,"w") if command == commands[5]: # Checks to see if the command is Load. print "Your program has been loaded." import Program.py else: # If it is run. onOrOff = "on" # Makes the program run. print "\n\n" line = 0 while line != len(program): # As long as 'line' is less than the length of the program it will run the program. if program[line] == commands[0]: # If it is 'print' print encode[line] # Print what was typed in. line += 1 elif program[line] == commands[3]: # If it is 'ask' raw_input(encode[line]) # Ask so and so then allows the user to type. line += 1 else: print "There seems to be something wrong with either your programming or my programming" line += 1 onOrOff = "off" # Go back to adding commands mode. print "\n\n" line = 0
Just open it in IDLE and you'll see the coding.
OOOPS that's the code I'm working with to be able to save and load files/programs that you made in Emerald, I need help with that. So there's the basic code, I'll go get the actual code...
Here: The first one has the greeting change and this one is the Original.
# This is the greeting. print \ """ Emerald 0.1 By Magnie """ commands = ["print","run","end","ask"] # Commands that you can type encode = [] # for print and ask commands encode2 = [] # for Variables onOrOff = "off" # I switch I never really knew what to call it. line = 0 # Just shows what line the Programming Language is accessing on the program i = 0 # Another switch program = [] # Where all the commands will be put. # Start while i != 1: while onOrOff == "off": # Add commands here command = raw_input("Type in a command: ") command.lower() if command != "run": if command == commands[0]: # Checks to see if it is print. recode = raw_input("What should your program print? ") # Allows you type type what you want for it to print. encode.append(recode) program.append(command) encode2.append(None) if command == commands[2]: # Checks to see if it's end. onOrOff = None # Makes it so you can't add a command and makes it so you can't run the program allowing it to close. i = 1 # Disables the whole script if command == commands[3]: # Checks to see if the command is Ask. recode = raw_input("What should you ask them? ") # Allows you to type what the 'question' is. encode.append(recode) program.append(command) encode2.append(None) else: # If it is run. onOrOff = "on" # Makes the program run. print "\n\n" while line != len(program): # As long as 'line' is less than the length of the program it will run the program. if program[line] == commands[0]: # If it is 'print' print encode[line] # Print what was typed in. line += 1 elif program[line] == commands[3]: # If it is 'ask' raw_input(encode[line]) # Ask so and so then allows the user to type. line += 1 else: print "There seems to be something wrong with either your programming or my programming" onOrOff = "off" # Go back to adding commands mode. print "\n\n" line = 0
Last edited by Magnie (2009-09-09 19:01:28)
Offline
...i really wish this will go into... like... commercial use...
Offline
I don't think so though. Someday it will die...
Offline
but it has to live, to die
Offline
lol, true. You could help us if you want.
Offline
i dont know python, i would help if there was anything i could do, outside the programing area.
Offline
Tcb: If I find a item that does that.
Marky: Maybe you could do images/GUI? I sugest that we continue this on this topic (Emerald): http://scratch.mit.edu/forums/viewtopic.php?pid=220072
Offline
I suggest that we get back on topic.
Only one post has been done here by the Scratch Team. Thank you Paddle2See. But is it possible to have a definite answer? Yes or no?
Offline
Yes, that was what I was talking about on my last reply.
Offline
ScratchScripter wrote:
Code:
//0:1:10:10:Comment/nNew lineThe first and second values are the same as with the attached comment,
the third and fourth values store the X and Y position on the scripts pane.
most text based programming languages have their comments like this
[var:hello]=10; the comment goes behind the ;
whatever script it is
Last edited by deatheater (2009-09-16 04:37:09)
Offline
not really, most programming languages require ; as end of command. In C family, the comment is either
//single-lined or
/*
multi
line
*/
But in other languages, comments often start from # (and sometimes ; but not very often)
Offline
Jonathanpb wrote:
I suggest that we get back on topic.
Only one post has been done here by the Scratch Team. Thank you Paddle2See. But is it possible to have a definite answer? Yes or no?
I would have to say,t hat we dont really need a definite answer, unless Emeral is canceled, which i dont think'll happen. Though it would be nice (Not necessary) to have scratch team help.
Offline
It would be really nice for the Scratch Team's help. But yes, not necessary.
Offline
filo5 wrote:
I already said I can help - I'm a beginning C# programmer, but I know few things. For example, C# is pretty object oriented; that helps a lot. Also, it is amazing, how many things you can do with a text string - instead of
"print (enter) LOL"
you could type
"print :LOL"
I WANT TO LEARN C#! Anyway I would like this as a Text-Based Scratch. Its....
Scratch#!
using scratch //I want to use scratch using scratch.blocks //I want to use scratch blocks using scratch.sprites //I want to use scratch sprites using scratch.backgrouds //I want to use scratch backgrounds project MyNewScratchProject //Starts project { public sprite Cat //The new project Cat sprite { Cat.loadcostume[0]="cat1-a.jpg"; //Set the costume scratch.flagclicked() //When the flag is clicked... { this.x=0; this.y=0; //Move to the center this.say("I'm back in the center of the screen"); //Say something } this.clicked() //When Cat is clicked... { this.x=mouse_x; this.y=mouse_y; // move to the mouse! playsound(getsound("meow.mp3")); //play sound } } static void Start() // main method { IntSprite(Cat); //Make a the cat Cat TestCat = new Cat; // A good thing about Scratch# is duplicating sprites TestCat.x=-100; //Make this new Cat be a little offset. Go(); // Play the project } }
Last edited by ThePiGuy (2009-09-28 00:02:25)
Offline
I like this idea. I think it should be implemented, it looks like something anyone could figure out.
Offline
hmnwilson wrote:
I like this idea. I think it should be implemented, it looks like something anyone could figure out.
It's being worked on right now.
Offline
If your talking about Emerald Magnie, then yeah, if the scratch team is doing it as well, then i never heard.
Offline
Yes, I'm talking about Emerald.
Offline
It's already being made.
Offline