Welcome to Synthiam!

Program robots using technologies created from industry experts. ARC is our free-to-use robot programming software that makes features like vision recognition, navigation and artificial intelligence easy.

Get Started
Asked — Edited
Resolved Resolved by Steve G!

How Do I Creat A Script

How do I do this, do i insert actions somewhere or what.


Please help!


*stress*:);):D

AI Support Bot
Related Content
Synthiam
#1  
To create a script, would click the project tab, then click the Add button. Click the scripting button on the window that comes up. From there, add a EZ-Script component or the EZ-Script Manager.

If you added the EZ-Script component, click the gear and give it a name then write your script. If you added a the EZ-Script Manager, click the add Script button and give it a name, the start your script.

Also, many controls give you the ability to add scripts to things, like the speech recognition component allows you to add a script to each of the speech commands that you add.
PRO
Synthiam
#2  
Can you explain what you are asking your robot to do?

A script means a billion things - please be specific and someone can help you:)
#3  
I would like my robot to be able to do things I make in the actions tab atomaticly. I just don't understand how to create one. Sorry if I am not descriptive anough I am new to this. The only robot I ever have had was a lego robot.


Thanks anyway!

:)
United Kingdom
#4  
Like DJ has said, it's a little difficult to help you as you need to be a little more specific in what your looking to do, and what robot you have. Try posting three simple examples of what you would like your robot to do automaticly, and maybe some can help by starting you off.

Also, have a look at the link below which is a tutorial for creating scripts. It will help you understand the basics. Don't worry about asking questions, just give as much detail as you can with what your asking. Details are your friend.;)

www.ez-robot.com/Tutorials/Lesson/23

As you mentioned "actions", another useful tutorial is for the auto positioner linked below, and it has a great video demonstration too.:)

www.ez-robot.com/Tutorials/Help.aspx?id=180
#6  
You can call an AutoPosition action in the script by entering this

ControlCommand("Auto Position", AutoPositionAction, "testAction")

The testAction text would be replaced with the name of the action you are trying to perform.

So if you want a condition to be met, to then call this action, your script would be something like this.

Code:


:DoActionWhenADCConditionMet
ADC_Wait (adc0, higher, 50)
ControlCommand("Auto Position", AutoPositionAction, "testAction")
GOTO(DoActionWhenADCConditionMet)


The first line is just a label that tells the goto at the end where to go back to
The second like looks for the value returned by ADC port 0 to be greater than 50.
The third line will cause the action called "testAction" to run if the value in the previous line greater that 50.
The fourth line goes back to the label DoActionWhenADCConditionMet

There are a huge number of things you can do in scripts so knowing when you want to fire the action will help us to provide an answer that is more relevant to your exact situation.
United Kingdom
#7  
As d.cochran has mentioned above, control commands are extremely useful for using actions in scripts. Essentially control commands are short cuts for making an action work, and pretty much every control, whether it's from a script you have made, scripts or controls from an example project, or a control you have added to your project yourself. This makes putting a robots actions together very easy as it doesn't require writing out new code.
PRO
Belgium
#8  
i think he needs some pics an excample like dj made the video for me.
treemonkey do you have skype.
United Kingdom
#9  
For a lot of examples on how to use ControlCommand in scripts to carry out the same task a lot have a look over my latest Ping Roam script. The main part of the script is almost entirely control commands running other smaller scripts.

The example revolution robots also use control commands in their init script and in any dancing scripts.