Greetings,

I've written a little script which is get image from the web, resize
it and display in widget. Here is the 'Init' part:

Init
    Begin
           Do {Exec wget -nv
http://www.riotingmanhattan.com/webcam/5thave.jpg -O - | convert
-resize 200 - $[HOME]/.fvwm/icons/webcam1.png}
           Do {Exec echo "Downloaded & converted at $(date +%H:%M:%S)"}
           ChangeIcon 1 webcam1.png
           Do {Exec echo "Image has been changed at $(date +%H:%M:%S)"}
    End

The 'PeriodicTasks' part of the script is the same, except one 'If'
statement which checks if it is already time to get new image.

The problem is that commands are ran in wrong order. Here is the
output taken from .xsession-errors:

Downloaded & converted at 17:55:00
Image has been changed at 17:55:00
17:55:02 URL:http://www.riotingmanhattan.com/webcam/5thave.jpg
[29046/29046] -> "-" [1]
Downloaded & converted at 17:55:20
Image has been changed at 17:55:20
17:55:21 URL:http://www.riotingmanhattan.com/webcam/5thave.jpg
[28753/28753] -> "-" [1]

As you can see the script first reports that image has been
downloaded, then it updates image in the widget, then reports that it
has changed the image and only after all these stuff it starts to
download the image.

Why?

fvwm 2.5.15 compiled on Jan 19 2006 at 07:41:07
with support for: ReadLine, Stroke, XPM, PNG, Shape, XShm, SM,
Xinerama, XRender, XFT, NLS

Thank you,
--
Ivan Butorin <[EMAIL PROTECTED]>

Reply via email to