; SetTime ; ------- ; Reads time off a time server via http. Not as accurate ; as a precision time setter, but works over http so will ; work through a firewall when time protocol blocked. ; Note set for East coast of Australia - see web site for ; URL of other time zones. ; report on ;debug on ;step on setfont verdana,12,B banner Set Time delay 15 banoff setfont verdana,8, banner Retrieving time from Internet... delay 15 geturl http://www.worldtimeserver.com/time.asp?locationid=AU-VIC,F banoff delay 10 iferror noserver dbgbox, %F setvar B,font size="7"> readline %F,A :scanit iferror notime srchstr %A,%B,C iferror next incvar C,14 substr %A,%C,E,D srchstr %D,<,B delstr %D,%B,E,A spltstr %A,:,B,C spltstr %C, ,D,E dbgbox %B dbgbox %D dbgbox %E ifvar E,AM,morn incvar B,12 goto time :morn ifnvar B,12,doit goto wrap :time iflvar B,24,doit :wrap setvar B,0 :doit dbgbox %B dbgbox %D settime %B,%D,0 goto end :next nextline %F,A goto scanit :noserver msgbox Set Time,Couldn't contact time server|Time not set,0 goto exit :notime msgbox Set Time,Couldn't read time|Time not set,0 goto exit :end ;! time < %A msgbox Set Time,Time set to %A,0 :exit