Script Timer

Navigation:  Widget Designer > Widgets > Buttons >

Script Timer

Previous page Return to chapter overview Next page

wd_widget_script-timer

The Script Timer control lets you execute a script after a certain amount of time. This can be done once or continuously.

By the first click on the ScriptTimer it will be started. A second click on it stops it again.

To create a Script Timer widget choose "Widgets > Buttons > Script Timer". The mouse cursor changes to a crosshair icon, indicating the create mode. With a left-click anywhere on the empty main background window you add the selected widget to the current page. Left-click again if you like to add one more. To quit the create mode, you can switch to the run mode with [F8], where you can use all widgets. Most widgets however need to be set up first.

To edit the ScriptTimer ’s parameters simply right-click on the desired ScriptTimer control and choose the menu entry "Item Properties", press [ALT+P] whilst the mouse is hovering above it or double-click on it when being in the edit / move mode [F9]. The ScriptTimer Property Dialog opens up.

wd_widget_script-timer-properties

Name

A unique name can be entered to identify the widget via the Object and Member Notation. The default name is based on the widget type and ID.

Page

This drop-down offers all available pages to place the widget on.

ID
The ScriptTimer ’s ID may be changed by entering a new one in the text field top left. If you change it, you will be asked if you also want to adapt the name to the new ID.

Notes

A short note can be added here. It is not displayed outside the widget but can be set and retrieved with the WidgetID.Note property member.

Visible

Uncheck this box to hide the widget.

Fix
When the option “Fix” is checked, the ScriptTimer will be displayed on every page.

Size

Enter a pixel size for the ScriptTimer's size.

X and Y

Enter the location of the widget (upper left corner) in pixels

Interval
Enter here the Interval time in ms, after which the ScriptTimer executes the script once or continuously.

Start/Stop

Starts and stops the ScriptTimer.

Execute on Start

If this box is checked, the script will be executed immediately when the ScriptTimer is started. Otherwise, the first script will be executed in the second interval.

Run Once
When “Run Once” is enabled, the Script Timer will execute the script once after the Interval Time is expired and then stops again.
When “Run Once” is disabled (by default) the Script Timer will execute the script continuously in the Interval you entered in the text field to the right (in ms).

Three images can be assigned to the different states of the ScriptTimer:
Release” refers to no click or not toggled.
Click” is on press or toggled.
Active” is the image appearing shortly at the beginning of each interval.

 

Click on the image place holder itself to open a file dialog where you can choose your path and image. If you like to choose an image from the Widget Designer "library", click on the "Res" button. The Resource Manager opens where you can double-click on the image of your choice. You can also save custom images in the Resource Manager to access them faster. The small "x" at the right sets the default image.

Script
In the Script section you may enter commands to be executed. You can type directly in the text field, the Script Assistant will help you finding the expression you search for. The topic Script Language explains this in more detail.
See here a list of all commands. To control the Script Timer itself via commands, please use these ones.

You can put as much text in the scripting field as you like, but for keeping a good overview, using Macros and Functions is recommended for sophisticated scripts

Ui Effects & Animations

CSS based effects and animations can be applied to this widget. Please refer to the topic Effects & Animations for more information.