![]() We can tell because it says Variable and it has a purple background. Let’s take a look at the increment command. In these cases the parameter will have a different color. Sometimes parameters want a specific thing such as a data type or selector code. I can put a function in here though, which means that I can nest several functions inside each other if I wanted. So that means that I cannot put a command inside of a parameter. And something you should know about parameters is that they can only contain plain text, functions, selector code, and data types which we will get to soon. This function has a parameter named “Text” and when we put a bunch of spaces before our text the trim function will remove any leading or trailing whitespace.īut the main reason I wanted to show you this function is to point out that functions can contain parameters as well. ![]() Now some functions have parameters of their own. Because we put the date function in the message parameter we will see the date when we run the script. And anything we put in the message parameter will be displayed to the user. Our alert command has a parameter which is called Message. So that means anywhere you put this function it will essentially replace this function with the date. Our date function simply returns the date. $date is a function and functions return data. I know this might be a bit confusing for some so I am going to say this one more time but in reverse order. That function is returning the data to the message parameter. And our message just so happens to be a function. Our alert command is performing the action of displaying a message to the user. So the difference between commands and functions is that commands perform an action and functions return data. Which means that I can drag the $date function into the message parameter of the alert command. Now in this alert command we have a parameter named “Message.” In this parameter field we can type normal text, or we can use functions here. So how can we use this function? First, we need to use a command directly in the scripting area. That is because the scripting area only allows commands to be used – that is why it says “Drag Commands Here.” Notice that when I drag this function into the scripting area we see a cancel sign and we are not allowed to drop this node into the scripting area. The sub section is called Time Functions. Let’s create one more script and name it “Time.” I want to use a function called $date, this can be found with all of the other functions under the Parameters section. Now that I’ve created a new script let’s run it. But this time instead of looking through the toolbox trying to find the command I am going to search the toolbox by pressing Ctrl + E To add another script we can press the add new script button.Īnd now I’m going to use another alert command. ![]() ![]() The run button will run the script in the current tab. Scripts are ran top to bottom and each command is called one after the other. We can run a script by pressing the Run button. Let’s create a simple hello world script: You can find commands by looking under the commands section of the toolbox. The scripting area is where you can drag commands in order to create a script. If you have another edition yours may look slightly different but don’t worry because most of the stuff we talk about in this video will work fine for any edition. This is the developer edition which is the most featured. There are a few different versions of Ubot Studio. While programming in Ubot you will be creating custom commands and functions which can be accessed by any part of the program. Ubot uses a procedural programming paradigm. These nodes are translated into uScript which you can also directly write while in code view. Ubot features a visual scripting system which allows you to drag out nodes and fill in their parameters rather than writing code. These bots can be compiled and run as a standalone application. Ubot Studio is a powerful web automation software which allows you to quickly and easily build scripts and bots. ![]()
0 Comments
Leave a Reply. |