Hi. I seem to be having trouble with what looks like an incredibly simple screensaver. Here is the code:
' Main() is useful for testing screensaver. It should be commented
' out before this is checked in.
'Sub Main()
' ShowScreenSaver()
'End Sub
' The screensaver entry point.
Sub RunScreenSaver()
ShowScreenSaver()
End Sub
Sub ShowScreenSaver()
' Works With Images
facade = CreateObject("roParagraphScreen")
facade.Show()
m.canvas = CreateObject("roImageCanvas")
canvas_size = m.canvas.GetCanvasRect()
m.canvas.Show()
while(true)
date = CreateObject("roDateTime")
m.canvas.SetLayer(1,{ url: "http://somesite.com/WeeklyFinal.png?&nocache=" + date.AsSeconds().ToStr()
CompositionMode: "Source"
TargetRect: {x:0,y:0,w:canvas_size.w,h:canvas_size.h}})
' Sleep For 30 Seconds
sleep(30000)
end while
m.canvas.Close()
End Sub
When I run the ShowScreenSaver from the Main subroutine it shows the WeeklyFinal.png image and updates it every 30 seconds. However, when I comment out the Main routine and run ShowScreenSaver from the RunScreenSaver subroutine all I get is a blank screen when I preview the screensaver.
Does anyone have any ideas. I'm sure I'm just being an imbecile.