Introduction

One of the powerful features of TrueUpdate is its scripting engine. This document will introduce you to the new scripting environment and language.

TrueUpdate scripting is very simple, with only a handful of concepts to learn. Here is what it looks like:

a = 5;
if a < 10 then
     Dialog.Message("Guess what?", "a is less than 10");
end

(Note: this script is only a demonstration. Don’t worry if you don’t understand it yet.)

The example above assigns a value to a variable, tests the contents of that variable, and if the value turns out to be less than 10, uses a TrueUpdate action called “Dialog.Message” to display a message to the user.

New programmers and experienced coders alike will find that TrueUpdate is a powerful, flexible yet simple scripting environment to work in.

A Quick Example of Scripting in TrueUpdate

Here is a short tutorial showing you how to enter a script into TrueUpdate and preview the results:

1.       Start a new project.

2.       In your project's Client Script, type in the following text:
Dialog.Message("Title", "Hello World");


It should look like this when you’re done:



 

3.       Choose Publish > Build from the program menu and go through the publish wizard.

4.       Once your project has finished building, run the created file (typically TrueUpdateClient.exe).

When the client script is run, the script you entered will be performed. You should see the following dialog appear:



Congratulations! You have just made your first script. Though this is a simple example, it shows you just how easy it is to make something happen in your TrueUpdate application. You can use the above method to try out any script you want in TrueUpdate. .