I suggest to use the "put" command with the "url" keyword, using a "send in time" structure:

on mouseUp
  checkWebsite ""
end mouseUp

on checkWebsite thePrev
  put line -1 of url "http://yoursite.com/yourfile"; into theCurrent
  if thePrev <> theCurrent then
    --do your stuff here, it changed!
  end if
  send checkWebsite theCurrent to me in 4.5 seconds
--slightly less then 5 seconds, assuming the download of the whole file takes ca. 0.5 seconds
end checkWebsite


Be aware that clicking the button twice would have your code execute twice every 4.5 seconds, so maybe you should check the pendingMessages somehwere. The docu on that property also shows on how to stop the repeating.

On 7 May 2009, at 05:43, John Patten wrote:

Hi All!

I'm making a little web browser client that needs to check the contents of a file on a web server. It needs to be able to do this every 5 seconds or so in the background, and then if the contents changes in the last line of the file it is checking, it starts another process in the background. Can this be done in Rev? Would I use two stacks, one as the browser and one with the repeat loop?

I'm at a loss for what this might look like in a script?

Thanks in Advance!


John Patten
_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution



--

official ChatRev page:
http://bjoernke.com/runrev/chatrev.php

Chat with other RunRev developers:
go stack URL "http://bjoernke.com/stacks/chatrev/chatrev1.3b3.rev";

_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to