Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[ALLY] Re: keep-alive.r

From: tbrownell::yahoo::com at: 11-Apr-2001 10:43

Same thing, with a slightly smaller footprint. :) T Brownell rebol [] view layout [ n: field "Enter number of seconds to wait." button "Start" [ n: to-integer n/text forever [ wait n read http://www.yahoo.com] ]] Anton <[arolls--bigpond--net--au]> wrote: I do tech support for money. Some ISPs cut off your connection after a certain idle time. Therefore I wrote this script to make some traffic every once in a while. rebol [ Title: "Keep Alive Connection" File: %keep-alive.r Date: 11-Apr-2001 Version: 1.0.0 Author: "Anton Rolls" Language: 'English Purpose: {To keep an internet connection alive by generating traffic every so often} ToDo: { - repeat on hold down over arrow buttons - delay precision in seconds } ] delay: 10 ; in minutes - yes, sadly this is only an integer value next-request: to-time reduce [delay 0] angle: 0 view layout [ h2 "Keep Alive Connection" space 0 text "This program works to keep your internet connection" text "alive by requesting a web page every so often." text "(Whether we actually get the web page is not important)." text "You can alter the time between requests:" across time: text font [size: 20] form delay text font [size: 20] " minutes" arrow up [if delay < 60 [delay: delay + 1 next-request: next-request + 1:0] time/text: delay show time] arrow down [if delay > 1 [delay: delay - 1 next-request: next-request - 1:0] time/text: delay show time] state-txt: text "state of the time" return pic: image 1x1 rate 1 feel [ engage: func [f a e][ if a = 'time [ either next-request > to-time 0 [ next-request: next-request - 0:01 ; reduce time to next request by one second state-txt/text: form next-request show state-txt ][ ; reset time next-request: to-time reduce [delay 0] ; make request state-txt/text: "requesting" show state-txt read http://yahoo.com ; maybe just a dns lookup is enough? ] ] ] ] ] Anton.