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: Rotem Kimchi <rotemk2@xxxxxxxxxxxxxxxx>
Date: Sun, 7 Nov 2010 21:02:47 +0200

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?

thanks in advance

2010/11/7 Daniel Ajoy <da.ajoy@xxxxxxxxx>

> On Sun, 07 Nov 2010 07:40:37 -0500, <
> askanexpert@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
> hello
>> i want to write lots of commands to a text file,
>> but i want that every command will create a new file with a new name.
>> how  can i do that?
> The command I would use is "savetext". From the help:
> savetext path
> Saves the text found in the current text box in a text file format.
> The input can be a file name with or without an extension (and the file
> will be saved in the current directory) or a full or relative path.
> savetext "story.txt
> So, to create different filename words, you just have to know the command
> to create words. That command is called "word"
> show word "happy "hour
> happyhour
> make "counter 1
> show word "file :counter
> file1
> make "counter :counter + 1
> show word "file :counter
> file2
> Daniel
> 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