#newcommand
@script VBScript
Option Explicit
Function OnClick(ByRef clickData)
Dim Dlg, Msg, Timer
Set Dlg = DOpus.Dlg
Dlg.template = "clock"
Dlg.detach = True
Dlg.Show
Timer = Dlg.SetTimer(1000)
Do
Set Msg = Dlg.GetMsg()
if Msg.event = "timer" Then
DOpus.Output "tick"
Dlg.Control("time").label = FormatDateTime(Now, vbLongTime)
end if
Loop While Msg
End Function
==SCRIPT RESOURCES
<resources>
<resource name="clock" type="dialog">
<dialog fontsize="20" height="21" lang="english" width="60">
<control halign="left" height="8" name="time" type="static" width="48" x="6" y="6" />
</dialog>
</resource>
</resources>