  dialog create,Dummy

  rem OPTION SLEEPTIME can be set to a high number, because
  rem there's no dialog for user-interaction. There's a dialog though for
  rem the script to be able to shutdown with Windows shutdown, so the Windows
  rem shutdown may have to wait for this duration before shutdown.

  option sleeptime,500

  option fieldsep,|
  list create,1
  list create,2
  list create,3
  repeat
    wait 3
    list winlist,1,CI
    list seek,1,0
    repeat
      %x = @match(1,#TScriptWin|)
      if %x
        parse ";%%win",@item(1)
        %%win = @window(%%win,CHILD)
        %%text = @wintext(%%win)
        rem the two double quotes on the next line of code are for preventing
        rem the script in this window from being considered to be clipboard
        rem content.
        if @greater(@pos(Source""URL:,%%text),0)
          list paste,2
          if @not(@zero(@count(2)))
            list assign,3,%%text
            list seek,3,0
            %y = @match(3,Version:)
            %%listpos = @index(3)
            repeat
              %%item = @item(3)
              list delete,3
            until @equal(%%item,</HTML>)
            %i = 0
            repeat
              %i = @succ(%i)
              %%insert = @item(2,@pred(%i))
              if @equal(@index(3),@pred(@count(3)))@zero(@count(3))
                list add,3,%%insert
                list seek,3,@pred(@count(3))
              else
                list insert,3
                list put,3,%%insert
                list seek,3,@succ(@index(3))
              end
            until @equal(%i,@count(2))
            window settext,%%win,@text(3)
          end
        end
        %x = @next(1)
      end
    until @not(%x)
  until @event()
  list close,3
  list close,2
  list close,1
