Project Folders
Teacher Resources
Student Resources
How Do I?
Site Map
Our Team

MWForum Message [Date Index] [Threads] [Authors] [Attachments] [Subscribe]

[Thread Prev] [Thread Next]

To: "MicroWorlds Forum" <mwforum@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: MIA, Ask an Expert: write to a file
From: "Daniel Ajoy" <da.ajoy@xxxxxxxxx>
Date: Sun, 07 Nov 2010 14:17:27 -0500

On Sun, 07 Nov 2010 14:02:47 -0500, Rotem Kimchi <rotemk2@xxxxxxxxxxxxxxxx> wrote:

I started with exporttext but it didnt work
your advie is much batter but i didnt succeeded on implement it
i tried

if :arrows = 40 [Robo, seth 180 fd :step
talkto "commands print sentence [seth 180 fd ]:step
talkto "SaveFile print sentence [seth 180 fd ]:step
savetext "command:i .txt
make i :i+1 ct ]; south

Butit didn't work the program doesn't recognize the command
any suggestions?

Yes. As I said, use the WORD command.

So, to create different filename words, you just have to know the command to create words. That command is called "word"

make "counter :counter + 1
show word "file :counter

In your case it should be:

savetext (word "command :i ".txt)
make "i :i + 1

Never forget to add spaces before and after math signs.

You will also need to initialize the "i" variable with the command:

make "i 0

Also, remember that the MAKE command expects a word as the name of the variable; therefore, the name of the variable I needs start with that double quote character.

Also, here:

savetext (word "command :i ".txt)

are words too (not commands); therefore, they need to begin with the double quote character.

OpenWorld Learning

  • Previous by thread: Re: MIA, Ask an Expert: write to a file
  • Next by thread: Re: MIA, Ask an Expert: write to a file

  • To save an attachment to your computer, PC users should right-click (Mac users, click and hold the mouse button) on the link and then choose 'save target as' from the pop-up menu. A window will then pop up in which you can choose a location for the file.

    © copyright 2001 - 2008