script to display current page

I am trying to write a simple script to display the current page
but the title is blank

WindowTitle {page}
WindowSize 60 20
Font “Shadow=1 SE:xft:tscu_comic:size=12:antialias=True:encoding=iso10646-1”

Init
Begin
Set $MailColorset =(GetScriptArgument 1)

ChangeTitle 1 {temp}
End

PeriodicTasks
Begin
Set $tmp = (GetOutput {echo $[page.ny]} 1 -1)
ChangeTitle 1 $tmp
End

Widget 1
Property
Type ItemDraw
Size 60 20
Position 0 0
Flags NoFocus

Main
Case message of
SingleClic:
Begin
End
End

I have tried
ChangeTitle 1 $[page.ny]
but that doesnt work either

why can it not read the variable?

[code]WindowTitle {FvwmScript-Page}
WindowSize 400 22
WindowPosition 12 5
Colorset 2
Font “xft:DejaVu Sans Mono:pixelsize=10:antialias=true:bold:hinting=true”

Init
Begin
Do {UpdateDeskPageNameFunc}
End

Widget 1
Property
Type ItemDraw
Position 0 0
Size 400 22
Flags NoReliefString Left
Main
Case message of
1 :
Begin
ChangeTitle 1 (LastString)
End
End[/code]

The following function needs to be called after you call “GotoPage.”

[code]DestroyFunc UpdateDeskPageNameFunc
AddToFunc UpdateDeskPageNameFunc

  • I PipeRead “echo SendToModule *FvwmScript-Page SendString 1 1 Desktop: $\[de
    sk.name$[desk.n]\] — Page: $$(echo $${FVWMPage$[desk.n]_$[page.nx]:-$[page.nx
    ]} | sed ‘s/&//’) out of $$(echo $${FVWMPage$[desk.pagesx]:-$(($[desk.pagesx] -
    1))})”
    [/code]