Reading and Writing with Files

Description

This tutorial is an introduction to working with text files in EZ-Builder. EZ-Builder gives you the ability to write information to text files and read information from text files. You can use this for logging data, giving your robot a memory, a way to read in data you might not want to manually enter in a script and anything else that your imagination might lead you to use text files for.

Controls

This tutorial uses the following controls:

Script
Step 1. Open a project

With EZ-Builder, locate the "Open" icon and click it

User-inserted image

January 14
So I did a quick experiment and here are some issues, you can add scripted data in your text file or comma separated file for an EZ-Script to take action on, but as you read in the lines you will assign them out to variables - which you then need to translate to an action or EZ-Script.  I don't see a way for EZ-Builder to understand its own scripting language from a file or to directly re-translate it.

This is why in the past I have used my own short hand commands in text files for the robot to read such as:

Justin Ratliff,Smile
Josh,Wave
DJ,Faint

That data might be in text file for people my robot knows and my scripts then use IF-THEN logic to carry out other scripts and actions based on those indicators in the text file like "Smile, Wave, Faint, etc." as examples.
DJ Sures
Synthiam
January 14
You can make an EZ-Builder plugin control that loads txt files and executes them. It'll be pretty easy to do - but i'm not sure why you'd want to do that yet. Can you give me a use-case? Is it to avoid having lots of script windows? Or to avoid having a script manager with lots of items in it?
January 14
yes basically not have a ton of script windows open
January 14
it seems like it could be cleaner if you could congregate them in a memo txt doc
DJ Sures
Synthiam
January 14
What about the script manager? Wouldn't that be the same thing?