If you are creating a widget there are several script commands that you can
use to replicate the functionality of the widgets and provide additional user
feedback.
These simply replicate the options available from the various widget menus to
allow you to achieve the functionality via script.returns the current
coordinates of the mouse cursor.
Widget.Caption
If you have specified that your widget is displayed in the taskbar then this
command will set the text of that taskbar item. Where a system tray icon is
used, it will set a tooltip for that item.
Example:
Widget.Caption = "This has been updated"
Widget.Autorun
Widget.Autorun
A user can specify whether to run an application on startup by right clicking
the object, but you can also access this functionality via script. This allows
you to either prompt the user when they first run the object, or to provide some
sort of menu option.
Example:
If Widget.Autorun = False Then
x = Msgbox (“Would you like to run this object when you start Windows?”, vbYesNo
+ vbQuestion, “Autorun …”)
If x = vbYes Then
Widget.Autorun = True
End If
End If
Widget.RegisterController
Normally object events are fired to the parent if the child isn’t handling
them directly. If the parent isn’t handling them, events are lost. You can
configure a script of a widget to be the target of all unhandled events,
regardless of parent/children relations.
To do that you can write the following code in Object_OnScriptEnter
Widget.RegisterController Object.name
Widget.OpenProperties
Opens the Widget Properties panel programmatically.
Widget.StandardPreferencesOptions
Let you selectively disable standard preference options from the widget
options. Values can be a combination of the following values:
&H0001 - Removes the opaticy option
&H0002 - Removes the shadow option
&H0004 - Removes the zorder option
&H0010 - Removes the accessibility option
&H0020 - Removes the autorun option