Return to main

Get a 60-day FREE trial!

See examples

How was this done?

How was this done?

Tech support

icon

Here's how this was done:

Most of the pages of this site were created with weber files. A weber file is a simple, extensible format for easily combining HTML and the power of WebBatch. In a weber file, the name of a WebBatch subroutine appears in {curly braces}. Everything else is standard HTML. Using the BinaryTag family of WebBatch operations, WebBatch scripts can be written to make quick work of processing the information within the {curly braces}.

To get the location, name and size of the current WebBatch download, we use a weber file to call a WebBatch program we wrote called "zip.web", like this:

    <A HREF="{zip?download}">
    Click here to download {zip?filename}</A>
    (about {zip?size}K)<P>
The "zip.web" routine can take one of three parameters: download, filename or size. Here's its source code:

; zip.web -- returns info relating to current version 
;            of webbatch, for weber files   
;
; designed to be called from weber.web
; so it assumes d=current directory
;
; wants "webbatch.ini" in current directory


; called without parameters? let's go
if param0==0 then return

; get what we're supposed to do
whichthing=param1

;set name of ini file
inifile=strcat(d,'webbatch.ini')

; set our default download in case ini file is broken
defaultwhere='../downloads/wb/eb44i17b.ZIP'

; read location from ini file
where=inireadpvt('where','zip',defaultwhere,inifile)

; is that what we want?
if stricmp(whichthing,'download')==0
    webout(where,0)
    return
endif

; do we just want the filename?
if stricmp(whichthing,'filename')==0
    slash=strindex(where,'/',0,@backscan)
    if slash==0 then return
    webout(strsub(where,slash+1,strlen(where)-slash),0)
    return
endif

; or do we just want the size?
if stricmp(whichthing,'size')==0
    size=inireadpvt('size','zip',1024,inifile)
    webout(size,0)
    return
endif

; otherwise just get out
return
Note: Some lines in this source code have been broken for improved readability.
Copyright ©1996-2017 by Island Lake Consulting LLC WebBatch is a trademark of Island Lake Consulting LLC. All other trademarks are the property of their respective owners.