Your DesktopX Documentation Resource Guide

Documentation Home

Quick Start

User's Guide

Developer's Guide

Resources

Tutorials


By now you should realize just w

Controller scripts

In the newest DesktopX release you can register an object and its script to act as a controller for certain functions. Only the controller receives some messages like system tray messages (i.e. the right-click message on the widget right click menu).

To register an object as a controller use Desktopx.RegisterController ObjectName
Example:

Sub Object_OnScriptEnter
desktopx.RegisterController Object.Name
End Sub

The object will then be called from the OnControl notification:

Function OnControl(lType, lCode)

End function

The host will call OnControl with messages information in lType and lCode. These messages are available:

lType

lCode

Description

1

1

1

The systray menu is requested.

2

The widget menu is requested from object right-click.

2

0x0201

Left button down

0x0202

Left button up

0x0203

Left buttondouble-click

0x0204

Right button down

0x0205

Right button up

0x0206

Right button double-click

Returning true to received messages will cause DesktopX not processing them. For instance you can replace the right click or systray widget menu by returning true to 1 / 1 notification and provide your own menu as described in the preceding chapter.
 


6/30 

Stardock prepares major update for Sins of a Solar Empire through an open beta

6/27 

Stardock releases first update to The Political Machine

6/26 

Epic Carnage Arrives with the Unreal Series

6/24 

Discover the Truth in Belief & Betrayal

6/23 

Conquer Germania for the Glory of Rome!

6/17 

The Political Machine 2008 Now Available

6/17 

Stardock Launches Impulse: The PC's Next-Generation Distribution Platform

6/5 

Conquer Britannia in the First Imperium Romanum Booster