Training In Ez-script

 
#1

I would like to have some help in writing code. A long time ago I coded in Basic. Before Windows. Therefore I have some understanding of coding and can code a little bit with EZ-script. I would like to understand it better and how to apply it.

I have finished all the training sections. I understand what each EZ-script does as it is explained very thoughtfully. It does seem that you need to have a pretty good understanding of programming to be efficient with the EZ-script.

1. Is there anywhere I can read how to apply EZ-script in EZ- Builder?

2. Do I need to learn VB.Net?

3. Is there a book I can buy?

4. How do I proceed with EZ.script to add code to EZ.builder program.

If I really understand how to do this I would be able to go a lot faster in creating my robot.

Thank you for your help.

#2

1. It's really a case of adding either the EZ-Script or the Script Manager controls in EZ-Builder and then triggering the scripts either manually with the start button or by using the ControlCommand()

2. No

3. No

4. See answer 1.

#3

1. The only info I know is what comes up beside the script writing area in EZ-Builder(Add control > scripting > Ez-script)

2. EZ-Builder is set up to require no passed programming knowledge.

3. You based on ez-robot? No, but there are books on the principles of robotics.

4.Add control > scripting > Ez-script. I came here with no experience, and now I can write fairly easily. Just read through the script help beside where you make your code.

#4

I find the best way to learn is to load some examples (ez builder has tons of Example Projects) that come with the ez builder download and start messing with them... Make subtle changes and see what kind of affect it has....

You will have a eureka moment that will make everything kind of make sense... Don't give up, stick with it... You know you can always ask here if you get stuck on something specific....

Smile

#5

Ellis,

The best way currently is to download some of the public project and look at how people are using the scripts. I have a public wall-e project that has a lot of scripts in it. Rich has a lot of them out there that are projects with specific purposes that are tutorials on specific things like automated ping roaming.

A book would be outdated by the time it was written with as quickly as new features are added so none have been written. There is help available in when writing scripts in the tools available for writing scripts. This and the examples from others, along with posting questions here are the best options available.

#6

I dont mean to pile on here but I just would like to validate what the others have said. The way I started to understand how to write EZ Script was to download other people's projects (mostly DJ's) to see how they used the EZ scripts and how they coded them. Sometimes just a series of one line commands with Sleep() pauses in between in the script is all you need for basic EZ Robot control. Sometimes you need to get more complicated with loops and commands that pause the script and wait for other things to happen before they restart.

There is a EZ Script manual with all the commands in each EZ Script control. Look for the tab that says "Script help" to the right of the script your writing. It has examples under each command. You can also study the commands here in the learn section under the EZ Script Manual tab:

EZScript-Manual

Heck, if you've already written script in Basic your way ahead of most of us were when we started here. It' mostly just structuring the script in a logical step by step way. Scripts are stupid. You need to tell them what to do each step of the way.

I'm by far no expert but a couple of important concepts I've learned are:
*You can have many scripts in EZ Builder.
*You can have as many scripts running as you want at one time.
*One script can start or stop any other script in EZ Builder.
*Write scripts with system resources and what is happening physically to your robot in mind. Place the needed Sleep() or Waitfor() commands where needed in loops or between commands. If you have a loop running without a pause it will take over your computers CPU and slow everything down. Sleep() commands also give actions time to complete. The next command may cancel out the first one. Without them it may appear your script is not doing anything.

If you get stuck there always seems someone is around here to lend a hand.
Winky

#7

Best way to learn is trial and error. Remember, EZ-Builder is more of a "Plug 'n' Play" program. scripting is basically putting all the widgets in order of operation. At first it seems hard, but after you fool around with it, it gets easier,and like Rich R said open examples and see the scripts so you can better understand the workings and you will be ok.

#8

@Anthony, I can see you haven't really delved too deep in to EZ-Script if it's "just basically putting all the widgets in order of operation" Winky

You can be basic and throw ControlCommand() in everywhere to set built in controls going and what not. You can use SayEZB() to get the robot to speak etc. but you can go so much deeper than that...

My newest "Ping Roam" which I've been working on since releasing the last version, so over a year now, uses some pretty complex maths to calculate turning circles, to stay running parallel to a wall, to move around objects and then return back to the path it was on...

Even my latest "Speak The Time" script uses a fair amount of IF statements to check different things and respond more naturally than a computer.

My "Weather Forecast" script responds dynamically like Jarvis has done for a couple of years, using the same methods I used on Jarvis but in EZ-Script.

Melvin is script with a lot of interlinked scripts and actions and has really developed his own attitude. Each thing he does, each thing I do, each thing I don't do affects his attitude and his desire to do what is asked of him.

These last examples are more than just listing widgets in order of operation. They are carrying out a whole host of checks dependent on the results of previous checks, sensor readings, dates, times, information scraped from the internet and in some cases data logged by other devices within my home.

EZ-Script can be as advanced as you can imagine it to be but it can also be simple. Start simple. The rest will fall in to place as you get more and more ambitious.


@Ellis, I've been adding my robot info, including scripts, to my website recently. Once I get the script pages to a point that I can publish them you will find I have explained every line, every segment of code, what it is and why we use it. This should hopefully help you and others looking for guidance. There is no ETA for when that'll be but I'll certainly bump a few of the smaller scripts up the to do list so I can get them published to guide you sooner rather than later. Until then, check out my cloud projects, most of my scripts (if not all of them) are well commented explaining each part of the script, what it does and why we need it.

#9

Thanks everyone. I will look at the samples and see if I can understand how and where to insert the script. Thanks for all the feedback.

I will get back to you after looking over the samples.

#10

I forgot to mention, I wrote this topic a while ago which may be of some help. However please note that some syntax may have been changed since writing it and new commands have been added which may make some of my methods a little over complicated now.