vipsi - the friendly vip script interpreter

Example Scripts

CGI Scripts

Online Chat

Some months ago i was thinking of adding a chat window to my web site. Time has passed by Operators: Boolean And with Variable "&&="
Operators: Bitwise And with Variable "&="
Operators: Bitwise And "&"
Operators: Boolean And "&&"
and
Flow control: if … then
Flow control: try … then
the
Example Scripts: CGI Scripts
Example Scripts: Scripts
script
is Numeric functions: nownow probably disfunct, but may serve as a Integer numbers: Base 256base for own work.

Download links

chat.cgi
chat.history
chat.sessions

Test links

/cgi-bin/chat.cgi

Listings

chat.cgi
#!/home/smile77/bin/vipsi


// chat Example Scripts: CGI Scripts
Example Scripts: Scripts
script
as used on my homepage // ---------------------------------- // very basic Operators: Boolean And with Variable "&&="
Operators: Bitwise And with Variable "&="
Operators: Bitwise And "&"
Operators: Boolean And "&&"
and
buggy // please adjust paths! Instructions: var
How does VScript::Value() work?: Var*&
var
argc = Numeric functions: countcount globals-1 Instructions: var
How does VScript::Value() work?: Var*&
var
Title = "Chat Operators: Make Identifier "@"at little-bat" Instructions: var
How does VScript::Value() work?: Var*&
var
H1_Login = "Welcome to chat Operators: Make Identifier "@"at little-bat!" Instructions: var
How does VScript::Value() work?: Var*&
var
H1_Input = "Chat Operators: Make Identifier "@"at little-bat!" Instructions: putput "content-type: Data Types: Text
Item selector "[]": Text
Glossary: text, text_val
text
/html; charset=utf-8\n\n" /* Kio's chat Example Scripts: CGI Scripts
Example Scripts: Scripts
script
Flow control: if … then
Flow control: try … then
the
chat consists of a frameset with an input frame Operators: Boolean And with Variable "&&="
Operators: Bitwise And with Variable "&="
Operators: Bitwise And "&"
Operators: Boolean And "&&"
and
an output frame. Flow control: if … then
Flow control: try … then
the
frameset is written Flow control: if … then
Flow control: if … then
if the
Example Scripts: CGI Scripts
Example Scripts: Scripts
script
is called with no Vipsi command syntax: Arguments
Glossary: Arguments
arguments
Flow control: if … then
Flow control: try … then
the
output frame is written Flow control: if … thenif Action == "Output" Flow control: if … then
Flow control: try … then
the
input frame is written for Action == "Input" */ Flow control: if … thenif !Numeric functions: existsexists Action Instructions: var
How does VScript::Value() work?: Var*&
var
Action = "Frameset" Flow control: if … then
Flow control: try … then
then
Flow control: if … thenif !Numeric functions: existsexists SessionID Instructions: var
How does VScript::Value() work?: Var*&
var
SessionID = List functions: env
Shell Immediate Commands: env
Shell Immediate Commands: env
env
.UNIQUE_ID Flow control: if … then
Flow control: try … then
then
Flow control: if … thenif !Numeric functions: existsexists Vipsi command syntax: Identifiers (names)
Identifiers, names
Operators: Make Identifier "@"
Text functions: name
Glossary: Name, Identifier
Name
Instructions: var
How does VScript::Value() work?: Var*&
var
Vipsi command syntax: Identifiers (names)
Identifiers, names
Operators: Make Identifier "@"
Text functions: name
Glossary: Name, Identifier
Name
= "" Flow control: if … then
Flow control: try … then
then
Flow control: if … thenif !Numeric functions: existsexists Password Instructions: var
How does VScript::Value() work?: Var*&
var
Password = "" Flow control: if … then
Flow control: try … then
then
Flow control: if … thenif !Numeric functions: existsexists TextInput Instructions: var
How does VScript::Value() work?: Var*&
var
TextInput = "" Flow control: if … then
Flow control: try … then
then
Instructions: var
How does VScript::Value() work?: Var*&
var
Sessions = {} // from Text functions: file
Instructions: file
file
Instructions: var
How does VScript::Value() work?: Var*&
var
Interactive Shell: HistoryHistory = {} // from Text functions: file
Instructions: file
file
Instructions: var
How does VScript::Value() work?: Var*&
var
Http = {} Instructions: var
How does VScript::Value() work?: Var*&
var
Text functions: file
Instructions: file
File
= {} Instructions: var
How does VScript::Value() work?: Var*&
var
Style = {} Instructions: var
How does VScript::Value() work?: Var*&
var
Img = {} Instructions: var
How does VScript::Value() work?: Var*&
var
ScriptFilename = List functions: env
Shell Immediate Commands: env
Shell Immediate Commands: env
env
.SCRIPT_FILENAME // "/home...cgi-bin/Listings: chat.cgichat.cgi" Instructions: var
How does VScript::Value() work?: Var*&
var
Example Scripts: CGI Scripts
Example Scripts: Scripts
Script
= List functions: env
Shell Immediate Commands: env
Shell Immediate Commands: env
env
.SCRIPT_NAME // "/bin-cgi/Listings: chat.cgichat.cgi" var Text functions: file
Instructions: file
File
.Root = List functions: env
Shell Immediate Commands: env
Shell Immediate Commands: env
env
.DOCUMENT_ROOT # "/" // "/home/pub/www/" Instructions: var
How does VScript::Value() work?: Var*&
var
Text functions: file
Instructions: file
File
.CgiDir = ScriptFilename[to Numeric functions: rfindrfind(ScriptFilename,"/")] Instructions: var
How does VScript::Value() work?: Var*&
var
Text functions: file
Instructions: file
File
.Interactive Shell: HistoryHistory = Text functions: file
Instructions: file
File
.CgiDir # "Listings: chat.historychat.history" Instructions: var
How does VScript::Value() work?: Var*&
var
Text functions: file
Instructions: file
File
.Sessions = Text functions: file
Instructions: file
File
.CgiDir # "Listings: chat.sessionschat.sessions" Instructions: var
How does VScript::Value() work?: Var*&
var
Http.Host = List functions: env
Shell Immediate Commands: env
Shell Immediate Commands: env
env
.HTTP_HOST // "10.0.0.4" Instructions: var
How does VScript::Value() work?: Var*&
var
Http.Root = "/" Flow control: if … thenif Http.Host=="10.0.0.4" || Text functions: lowerstrlowerstr(Http.Host[to 4])=="eden" Text functions: file
Instructions: file
File
.Root #= "little-bat.de/" Http.Root #= "little-bat.de/" Flow control: if … then
Flow control: try … then
then
Instructions: var
How does VScript::Value() work?: Var*&
var
Http.Images = Http.Root # "b/" Instructions: var
How does VScript::Value() work?: Var*&
var
Http.Hdgr = Http.Images # "hdgr.jpg" Instructions: var
How does VScript::Value() work?: Var*&
var
Http.Bat128 = Http.Images # "bat_sw_128_frei.png" Instructions: var
How does VScript::Value() work?: Var*&
var
Http.Space = Http.Images # "_.gif" Instructions: var
How does VScript::Value() work?: Var*&
var
Style.NoGap = " style='margin:0px;padding:0px;' " Instructions: var
How does VScript::Value() work?: Var*&
var
Style.Body = " style='margin:0px;padding:8px; \ background-color:#cccccc; \ background-image:url(" #Http.Hdgr# ")' " Instructions: var
How does VScript::Value() work?: Var*&
var
Style.Self = "style='font-weight:bold;'" Instructions: var
How does VScript::Value() work?: Var*&
var
Style.Kio = "style='color:#000099;'" Instructions: var
How does VScript::Value() work?: Var*&
var
Style.User = "style=''" Instructions: var
How does VScript::Value() work?: Var*&
var
Style.Anon = "style='color:#666666;'" Instructions: var
How does VScript::Value() work?: Var*&
var
Img.Bat128 = "<img width=128 height=128 src='" #Http.Bat128# "'>" Instructions: procproc Img.Space(w,h) { Flow control: returnreturn "<img width='" #w# "' height='" #h# "' src='"#Http.Space#"'>" } /* ---------------------------------------------------------------------- in: Action == Frameset => send frameset */ Flow control: if … thenif Action=="Frameset" Instructions: putput« <!doctype html public "-//w3c//dtd html 4.01 frameset//en" <html> <head> <title>» #Title# «</title> <meta http-equiv='content-type' content='Data Types: Text
Item selector "[]": Text
Glossary: text, text_val
text
/html; charset=utf-8'> <meta Vipsi command syntax: Identifiers (names)
Identifiers, names
Operators: Make Identifier "@"
Text functions: name
Glossary: Name, Identifier
name
='author' content='kio@little-bat.de'> <meta Vipsi command syntax: Identifiers (names)
Identifiers, names
Operators: Make Identifier "@"
Text functions: name
Glossary: Name, Identifier
name
='robots' content='noindex'> </head> <frameset rows='256,*'> <frame src='» ,Example Scripts: CGI Scripts
Example Scripts: Scripts
Script
, «?Action=Login' Vipsi command syntax: Identifiers (names)
Identifiers, names
Operators: Make Identifier "@"
Text functions: name
Glossary: Name, Identifier
name
='chat_input' scrolling=no> <frame src='» ,Example Scripts: CGI Scripts
Example Scripts: Scripts
Script
, «?Action=Empty' Vipsi command syntax: Identifiers (names)
Identifiers, names
Operators: Make Identifier "@"
Text functions: name
Glossary: Name, Identifier
name
='chat_output'> </frameset> <body><h1>Frames required!!</h1></body></html> » Flow control: end
Shell Immediate Commands: exit, quit, end
end
Flow control: if … then
Flow control: try … then
then
/* ------------------------------------------------------------------- Action != Frameset => send standard frame header */ Instructions: putput «\ <!doctype html public "-//w3c//dtd html 4.01 transitional//en" <html> <head> <title>» #Title# «</title> <meta http-equiv='content-type' content='Data Types: Text
Item selector "[]": Text
Glossary: text, text_val
text
/html; charset=utf-8'> <meta Vipsi command syntax: Identifiers (names)
Identifiers, names
Operators: Make Identifier "@"
Text functions: name
Glossary: Name, Identifier
name
='author' content='kio@little-bat.de'> » Flow control: if … thenif Action=="Output" Instructions: putput «<meta http-equiv="refresh" content=\"20; URL=» # Example Scripts: CGI Scripts
Example Scripts: Scripts
Script
# "?Action=Output&amp;SessionID=" # SessionID # «">\n» Flow control: if … then
Flow control: try … then
then
Instructions: putput «<style type='Data Types: Text
Item selector "[]": Text
Glossary: text, text_val
text
/css'><!-- table,tr,td,p,h1,h2,form,input {padding:0px;margin:0px;} --></style> </head> » /* -------------------------------------------------------------------- Action == ShowSource show my own source: */ Flow control: if … thenif Action == "ShowSource" Instructions: var
How does VScript::Value() work?: Var*&
var
mysource = Text functions: file
Instructions: file
file
(ScriptFilename) Text functions: convert
Instructions: convert
convert
mysource from utf8 Text functions: convert
Instructions: convert
convert
mysource to html Instructions: putput "<body", Style.Body, ">\n" Instructions: putput "<pre>",Constants: nlnl, mysource, Constants: nlnl,"</pre></body></html>",Constants: nlnl Flow control: end
Shell Immediate Commands: exit, quit, end
end
Flow control: if … then
Flow control: try … then
then
/* ---- Utilities ----------------------------------------------------- */ Instructions: procproc Styled ( style, block ) { Instructions: var
How does VScript::Value() work?: Var*&
var
i = Numeric functions: findfind(block,">") Flow control: returnreturn block[to i-1] # " " # style # block[i to] } Instructions: procproc Block ( tag, content ) { Instructions: var
How does VScript::Value() work?: Var*&
var
r1 = "<" # tag # "\n>" Instructions: var
How does VScript::Value() work?: Var*&
var
r3 = "</" # tag # "\n>" Flow control: if … thenif Numeric functions: islistislist content Instructions: var
How does VScript::Value() work?: Var*&
var
r2 = "" Instructions: var
How does VScript::Value() work?: Var*&
var
i=0 Flow control: do … loopdo Flow control: whilewhile ++i<=Numeric functions: countcount content r2 #= content[i] Flow control: do … looploop Flow control: returnreturn r1 # r2 # r3 Flow control: if … then
Flow control: try … then
else
Flow control: returnreturn r1 # content # r3 Flow control: if … then
Flow control: try … then
then
} Instructions: procproc H1 ( Data Types: Text
Item selector "[]": Text
Glossary: text, text_val
text
) { Flow control: returnreturn Block("h1",Data Types: Text
Item selector "[]": Text
Glossary: text, text_val
text
) } Instructions: procproc H2 ( Data Types: Text
Item selector "[]": Text
Glossary: text, text_val
text
) { Flow control: returnreturn Block("h2",Data Types: Text
Item selector "[]": Text
Glossary: text, text_val
text
) } Instructions: procproc P ( Data Types: Text
Item selector "[]": Text
Glossary: text, text_val
text
) { Flow control: returnreturn Block("p", Data Types: Text
Item selector "[]": Text
Glossary: text, text_val
text
) } Instructions: procproc Table ( rows ) { Flow control: returnreturn Styled( "cellpadding=0 cellspacing=0 border=0", Block("table", rows) ) } Instructions: procproc TR ( cells ) { Flow control: returnreturn Styled( "valign=top", Block("tr",cells) ) } Instructions: procproc TD ( content ) { Flow control: if … thenif content=="" content="&nbsp;" Flow control: if … then
Flow control: try … then
then
Flow control: returnreturn Block( "td", content ) } Instructions: procproc Input ( ) { Flow control: returnreturn "<input type='Data Types: Text
Item selector "[]": Text
Glossary: text, text_val
text
'" # Style.NoGap # "\n>" } Instructions: procproc Button ( url, Data Types: Text
Item selector "[]": Text
Glossary: text, text_val
text
) { Flow control: returnreturn "<input type='button' Glossary: Valuevalue='" #text# "' " # Style.NoGap # « onClick="location.href='» #url# «'">» } Instructions: procproc Form ( content ) { Flow control: returnreturn Styled( «action="» #Script# «" method="post"», Block( "form", content ) ) } Instructions: procproc JS ( jscript ) { Flow control: returnreturn "<Example Scripts: CGI Scripts
Example Scripts: Scripts
script
type=\"Data Types: Text
Item selector "[]": Text
Glossary: text, text_val
text
/javascript\">" # jscript # "</Example Scripts: CGI Scripts
Example Scripts: Scripts
script
>\n" } Instructions: procproc WriteSessions() { /* ***TODO*** blocking */ Text functions: file
Instructions: file
file
Text functions: file
Instructions: file
File
.Sessions = Data Types: Text
Text functions: string
string
Sessions } Instructions: procproc ReadSessions() { /* ***TODO*** blocking */ Flow control: if … thenif Sessions=={} Sessions = Functions with varying return types: eval
Instructions: eval
eval
Text functions: file
Instructions: file
file
Text functions: file
Instructions: file
File
.Sessions Flow control: if … then
Flow control: try … then
then
} Instructions: procproc WriteHistory() { /* ***TODO*** blocking */ Text functions: file
Instructions: file
file
Text functions: file
Instructions: file
File
.Interactive Shell: HistoryHistory = Data Types: Text
Text functions: string
string
Interactive Shell: HistoryHistory } Instructions: procproc ReadHistory() { /* ***TODO*** blocking */ Flow control: if … thenif Interactive Shell: HistoryHistory=={} Interactive Shell: HistoryHistory = Functions with varying return types: eval
Instructions: eval
eval
Text functions: file
Instructions: file
file
Text functions: file
Instructions: file
File
.Interactive Shell: HistoryHistory Flow control: if … then
Flow control: try … then
then
} Instructions: procproc FindName() { Instructions: var
How does VScript::Value() work?: Var*&
var
i = Numeric functions: countcount Sessions +1 Flow control: do … loopdo Flow control: whilewhile --i Flow control: untiluntil Vipsi command syntax: Identifiers (names)
Identifiers, names
Operators: Make Identifier "@"
Text functions: name
Glossary: Name, Identifier
Name
==Sessions[i,1] Flow control: do … looploop Flow control: returnreturn i } /* ---- Check Login -------------------------------------------------- in: Action == "CheckLogin" Vipsi command syntax: Identifiers (names)
Identifiers, names
Operators: Make Identifier "@"
Text functions: name
Glossary: Name, Identifier
Name
= Vipsi command syntax: Identifiers (names)
Identifiers, names
Operators: Make Identifier "@"
Text functions: name
Glossary: Name, Identifier
name
Password = password */ Flow control: if … thenif Action == "CheckLogin" ReadSessions() ReadHistory() Instructions: procproc PW_OK() { Flow control: if … thenif Vipsi command syntax: Identifiers (names)
Identifiers, names
Operators: Make Identifier "@"
Text functions: name
Glossary: Name, Identifier
Name
[1]=="(" Flow control: returnreturn 0 Flow control: if … then
Flow control: try … then
then
Flow control: if … thenif Numeric functions: countcount Vipsi command syntax: Identifiers (names)
Identifiers, names
Operators: Make Identifier "@"
Text functions: name
Glossary: Name, Identifier
Name
<3 Flow control: returnreturn 0 Flow control: if … then
Flow control: try … then
then
Instructions: var
How does VScript::Value() work?: Var*&
var
i = FindName() Flow control: if … thenif i==0 Flow control: returnreturn 0 Flow control: if … then
Flow control: try … then
then
Flow control: if … thenif Password!=Sessions[i,2] Flow control: returnreturn 0 Flow control: if … then
Flow control: try … then
then
Sessions[i,3] = SessionID Flow control: returnreturn 1 } Flow control: if … thenif Password=="" && Numeric functions: countcount Vipsi command syntax: Identifiers (names)
Identifiers, names
Operators: Make Identifier "@"
Text functions: name
Glossary: Name, Identifier
Name
>= 3 Action = "Input" Vipsi command syntax: Identifiers (names)
Identifiers, names
Operators: Make Identifier "@"
Text functions: name
Glossary: Name, Identifier
Name
= "(" # Vipsi command syntax: Identifiers (names)
Identifiers, names
Operators: Make Identifier "@"
Text functions: name
Glossary: Name, Identifier
Name
# ")" Sessions ##= {{ Vipsi command syntax: Identifiers (names)
Identifiers, names
Operators: Make Identifier "@"
Text functions: name
Glossary: Name, Identifier
Name
, "", SessionID, Numeric functions: nownow }} Interactive Shell: HistoryHistory ##= {{ Vipsi command syntax: Identifiers (names)
Identifiers, names
Operators: Make Identifier "@"
Text functions: name
Glossary: Name, Identifier
Name
, SessionID, "+++ logged in +++" }} Flow control: if … then
Flow control: try … then
else
Flow control: if … thenif !PW_OK() Action = "RetryLogin" Interactive Shell: HistoryHistory ##= {{ Vipsi command syntax: Identifiers (names)
Identifiers, names
Operators: Make Identifier "@"
Text functions: name
Glossary: Name, Identifier
Name
, SessionID, "+++ failed to Numeric functions: log
Numeric functions: loge
Instructions: log
log
in +++" }} Flow control: if … then
Flow control: try … then
else
Action = "Input" Interactive Shell: HistoryHistory ##= {{ Vipsi command syntax: Identifiers (names)
Identifiers, names
Operators: Make Identifier "@"
Text functions: name
Glossary: Name, Identifier
Name
, SessionID, "+++ logged in +++" }} Sessions[FindName(),4] = Numeric functions: nownow Flow control: if … then
Flow control: try … then
then
Flow control: if … then
Flow control: try … then
then
Flow control: if … thenif Action!="RetryLogin" WriteSessions() Flow control: if … then
Flow control: try … then
then
WriteHistory() Flow control: if … then
Flow control: try … then
then
/* ---- Login --------------------------------------------------------- in: Action == "Login" / "RetryLogin" => present Flow control: if … then
Flow control: try … then
the
login screen */ Flow control: if … thenif Action=="Login" || Action=="RetryLogin" Instructions: procproc Login() { Instructions: var
How does VScript::Value() work?: Var*&
var
text1 = H1(H1_Login) # "<p>List functions: thisThis chat system is for help Operators: Boolean And with Variable "&&="
Operators: Bitwise And with Variable "&="
Operators: Bitwise And "&"
Operators: Boolean And "&&"
and
discussions related to \ software Operators: Boolean And with Variable "&&="
Operators: Bitwise And with Variable "&="
Operators: Bitwise And "&"
Operators: Boolean And "&&"
and
projects on List functions: thisthis site." "<p>Please Numeric functions: log
Numeric functions: loge
Instructions: log
log
in." # "<br>&nbsp;" Instructions: var
How does VScript::Value() work?: Var*&
var
t1 = TD( "Vipsi command syntax: Identifiers (names)
Identifiers, names
Operators: Make Identifier "@"
Text functions: name
Glossary: Name, Identifier
Name
" ) # TD( "<input type='Data Types: Text
Item selector "[]": Text
Glossary: text, text_val
text
' Vipsi command syntax: Identifiers (names)
Identifiers, names
Operators: Make Identifier "@"
Text functions: name
Glossary: Name, Identifier
name
='Vipsi command syntax: Identifiers (names)
Identifiers, names
Operators: Make Identifier "@"
Text functions: name
Glossary: Name, Identifier
Name
' \ size=20 style='width:100%'>" ) Instructions: var
How does VScript::Value() work?: Var*&
var
t2 = TD( "Password" ) # TD( "<input type='password' Vipsi command syntax: Identifiers (names)
Identifiers, names
Operators: Make Identifier "@"
Text functions: name
Glossary: Name, Identifier
name
='Password' \ size=20 style='width:100%'>" ) Instructions: var
How does VScript::Value() work?: Var*&
var
t3 = TD("<input type='hidden' Vipsi command syntax: Identifiers (names)
Identifiers, names
Operators: Make Identifier "@"
Text functions: name
Glossary: Name, Identifier
name
='Action' Glossary: Valuevalue='CheckLogin'>") # Styled( "width='70%' align=right", TD("<input type='submit' Glossary: Valuevalue='Enter' style='width:50%'>") ) Instructions: var
How does VScript::Value() work?: Var*&
var
t = TR(t1) ## TR(t2) ## TR(t3) Instructions: var
How does VScript::Value() work?: Var*&
var
text2 = "" Flow control: if … thenif Action=="RetryLogin" text2 = "<p style='color:#cc0000'>Your login failed!" Flow control: if … then
Flow control: try … then
then
Instructions: var
How does VScript::Value() work?: Var*&
var
text3 = "<p>Flow control: if … thenIf you are Instructions: newnew, enter your Vipsi command syntax: Identifiers (names)
Identifiers, names
Operators: Make Identifier "@"
Text functions: name
Glossary: Name, Identifier
name
Operators: Boolean And with Variable "&&="
Operators: Bitwise And with Variable "&="
Operators: Bitwise And "&"
Operators: Boolean And "&&"
and
leave Flow control: if … then
Flow control: try … then
the
password blank." # "<br>Send e-mail to Kio to register a user Vipsi command syntax: Identifiers (names)
Identifiers, names
Operators: Make Identifier "@"
Text functions: name
Glossary: Name, Identifier
name
Operators: Boolean And with Variable "&&="
Operators: Bitwise And with Variable "&="
Operators: Bitwise And "&"
Operators: Boolean And "&&"
and
password." Flow control: returnreturn text1 # Styled("Vipsi command syntax: Identifiers (names)
Identifiers, names
Operators: Make Identifier "@"
Text functions: name
Glossary: Name, Identifier
name
='login_form'",Form(Table(t))) # text2 # text3 } Instructions: var
How does VScript::Value() work?: Var*&
var
td={} td ##= Styled( "width=128 height=128", TD(Img.Bat128) ) td ##= Styled( "width=16", TD(Space(16,2)) ) td ##= Styled( "align=center", TD(Login()) ) Instructions: putput "<body", Style.Body, ">\n" Instructions: putput Styled( "width='100%'", Table(TR(td)) ) Instructions: putput JS ( // on load: focus for Vipsi command syntax: Identifiers (names)
Identifiers, names
Operators: Make Identifier "@"
Text functions: name
Glossary: Name, Identifier
name
input "document.login_form.Vipsi command syntax: Identifiers (names)
Identifiers, names
Operators: Make Identifier "@"
Text functions: name
Glossary: Name, Identifier
Name
.focus();" ) Flow control: end
Shell Immediate Commands: exit, quit, end
end
Flow control: if … then
Flow control: try … then
then
/* ---- Input -------------------------------------------------------------- in: Action == "Input" SessionID = Session ID List functions: thisthis runs in Flow control: if … then
Flow control: try … then
the
upper frame is never reloaded again submitting Flow control: if … then
Flow control: try … then
the
form reloads Flow control: if … then
Flow control: try … then
the
lower frame with Flow control: if … then
Flow control: try … then
the
Instructions: newnew Interactive Shell: Historyhistory */ Flow control: if … thenif Action == "Input" ReadSessions() Instructions: var
How does VScript::Value() work?: Var*&
var
i=0 Flow control: do … loopdo Flow control: whilewhile ++i<=Numeric functions: countcount Sessions Flow control: untiluntil SessionID==Sessions[i,3] Flow control: do … looploop Flow control: if … thenif i>Numeric functions: countcount Sessions Instructions: putput "<p>internal error #306#",Constants: nlnl Flow control: end
Shell Immediate Commands: exit, quit, end
end
vipsi - the friendly one.: The namethen Name = Sessions[i,1] Password = Sessions[i,2] Instructions: procproc Enter() { Instructions: var
How does VScript::Value() work?: Var*&
var
Data Types: Text
Item selector "[]": Text
Glossary: text, text_val
text
= H1(H1_Input) # P("please be patient!") Instructions: var
How does VScript::Value() work?: Var*&
var
f1 = "<textarea onKeyUp='CheckForSend()' Vipsi command syntax: Identifiers (names)
Identifiers, names
Operators: Make Identifier "@"
Text functions: name
Glossary: Name, Identifier
name
='TextInput' \ cols=50 rows=4></textarea>" Instructions: var
How does VScript::Value() work?: Var*&
var
f2 = "<input type='submit' Glossary: Valuevalue='Send'>" Instructions: var
How does VScript::Value() work?: Var*&
var
f3 = "<input type='hidden' Vipsi command syntax: Identifiers (names)
Identifiers, names
Operators: Make Identifier "@"
Text functions: name
Glossary: Name, Identifier
name
='Action' Glossary: Valuevalue='Output'>" Instructions: var
How does VScript::Value() work?: Var*&
var
f4 = "<input type='hidden' Vipsi command syntax: Identifiers (names)
Identifiers, names
Operators: Make Identifier "@"
Text functions: name
Glossary: Name, Identifier
name
='SessionID' Glossary: Valuevalue='"#SessionID#"'>" Instructions: var
How does VScript::Value() work?: Var*&
var
f5 = "<input type='hidden' Vipsi command syntax: Identifiers (names)
Identifiers, names
Operators: Make Identifier "@"
Text functions: name
Glossary: Name, Identifier
name
='Vipsi command syntax: Identifiers (names)
Identifiers, names
Operators: Make Identifier "@"
Text functions: name
Glossary: Name, Identifier
Name
' Glossary: Valuevalue='"#Name#"'>" Instructions: var
How does VScript::Value() work?: Var*&
var
f6 = Styled( "href='"#Script# "?Action=ShowSource' target='chat_output'", Block("a","show source") ) Instructions: var
How does VScript::Value() work?: Var*&
var
form = Styled( "Vipsi command syntax: Identifiers (names)
Identifiers, names
Operators: Make Identifier "@"
Text functions: name
Glossary: Name, Identifier
name
='input_form' target='chat_output'", Form(f1#"<p>"#f6#f3#f4#f5#" &nbsp; "#f2) ) Flow control: returnreturn Data Types: Text
Item selector "[]": Text
Glossary: text, text_val
text
# form } Instructions: var
How does VScript::Value() work?: Var*&
var
td={} td ##= Styled( "width=128 height=128", TD(Img.Bat128) ) td ##= Styled( "width=16", TD(Space(16,2)) ) td ##= Styled( "align=center", TD(Enter()) ) Instructions: putput "<body onUnload=\"Logout();\" ", Style.Body, ">\n" Instructions: putput JS ( // onKeyUp event: works only for few browsers "Vipsi command syntax: Functions
Functions
Glossary: Function
function
CheckForSend(){Instructions: var
How does VScript::Value() work?: Var*&
var
d=document.input_form, \ t=d.TextInput, v=t.Glossary: Valuevalue;" # "Flow control: if … thenif(v[v.length-1]<\" \") { d.submit(); t.Glossary: Valuevalue=\"\"; \ t.focus(); } }" # // onUnload event: seems to work when Instructions: newnew url loaded // but Operators: Bitwise Not "~"
Operators: Boolean Negation "!"
not
when window closed "Vipsi command syntax: Functions
Functions
Glossary: Function
function
Logout(){Instructions: var
How does VScript::Value() work?: Var*&
var
d=document.input_form, t=d.TextInput; \ t.Glossary: Valuevalue=\"--- logged out ---\";d.submit();}" ) Instructions: putput Styled( "width='100%'", Table(TR(td)) ) Instructions: putput JS ( // on load: focus for textarea "document.input_form.TextInput.focus();" # "parent.chat_output.location.href=\""#Script# "?Action=Output&SessionID="#SessionID#"\";" ) Instructions: var
How does VScript::Value() work?: Var*&
var
i = Numeric functions: countcount Sessions +1 Flow control: do … loopdo Flow control: whilewhile --i Flow control: untiluntil Sessions[i,3]!="" && Sessions[i,3]!=SessionID Flow control: do … looploop Flow control: if … thenif !i && Text functions: lowerstrlowerstr(Vipsi command syntax: Identifiers (names)
Identifiers, names
Operators: Make Identifier "@"
Text functions: name
Glossary: Name, Identifier
Name
)!="kio" Instructions: putput JS("alert(\"You are alone. Kio is Operators: Bitwise Not "~"
Operators: Boolean Negation "!"
not
online.\n\ You may leave Flow control: if … then
Flow control: try … then
the
chat window hanging around Operators: Boolean And with Variable "&&="
Operators: Bitwise And with Variable "&="
Operators: Bitwise And "&"
Operators: Boolean And "&&"
and
Instructions: waitwait.\")") Flow control: if … then
Flow control: try … then
then
Flow control: end
Shell Immediate Commands: exit, quit, end
end
Flow control: if … then
Flow control: try … then
then
/* ---- Output ---------------------------------------------------------- in: Action == "Output" TextInput = Instructions: newnew Data Types: Text
Item selector "[]": Text
Glossary: text, text_val
text
Operators: Boolean Or with Variable "||="
Operators: Bitwise Or with Variable "|="
Operators: Bitwise Or "|"
Operators: Boolean Or "||"
or
empty SessionID = session ID */ Flow control: if … thenif Action == "Output" ReadHistory() ReadSessions() Instructions: var
How does VScript::Value() work?: Var*&
var
i=Numeric functions: countcount TextInput Flow control: do … loopdo Flow control: whilewhile i>=1 Flow control: whilewhile TextInput[i]<=" " Instructions: var
How does VScript::Value() work?: Var*&
var
z = TextInput[to --i] TextInput = z Flow control: do … looploop Instructions: putput "<body", Style.Body, ">\n" Flow control: do … loopdo Flow control: whilewhile Numeric functions: countcount Interactive Shell: HistoryHistory > 20 Instructions: deldel Interactive Shell: HistoryHistory[1] Flow control: do … looploop Flow control: if … thenif TextInput!="" Interactive Shell: HistoryHistory ##= {{ Vipsi command syntax: Identifiers (names)
Identifiers, names
Operators: Make Identifier "@"
Text functions: name
Glossary: Name, Identifier
Name
, SessionID, TextInput }} WriteHistory() Instructions: putput JS("Instructions: var
How does VScript::Value() work?: Var*&
var
t=parent.chat_input.document.input_form.TextInput; \ t.Glossary: Valuevalue=\"\";t.focus();") Flow control: if … then
Flow control: try … then
then
Instructions: var
How does VScript::Value() work?: Var*&
var
i = Numeric functions: countcount Sessions +1 Flow control: do … loopdo Flow control: whilewhile --i Flow control: if … thenif Sessions[i,3]==SessionID Sessions[i,4] = Numeric functions: nownow Flow control: if … then
Flow control: try … then
then
Flow control: if … thenif Sessions[i,3]!="" && Numeric functions: nownow - Sessions[i,4] > 60 Interactive Shell: HistoryHistory ##= {{ Sessions[i,1], Sessions[i,3], "--- vanished ---" }} WriteHistory() Sessions[i,3] = "" Flow control: if … thenif Sessions[i,1,1]=="(" Instructions: deldel Sessions[i] Flow control: if … then
Flow control: try … then
then
Flow control: if … then
Flow control: try … then
then
Flow control: do … looploop WriteSessions() Instructions: var
How does VScript::Value() work?: Var*&
var
i=Numeric functions: countcount Interactive Shell: HistoryHistory Flow control: do … loopdo Flow control: whilewhile i Instructions: var
How does VScript::Value() work?: Var*&
var
style = Style.User Flow control: if … thenif Interactive Shell: HistoryHistory[i,1,1]=="(" style = Style.Anon Flow control: if … then
Flow control: try … then
then
Flow control: if … thenif Text functions: lowerstrlowerstr(Interactive Shell: HistoryHistory[i,1])=="kio" style = Style.Kio Flow control: if … then
Flow control: try … then
then
Flow control: if … thenif Interactive Shell: HistoryHistory[i,2]==SessionID style=Style.Self Flow control: if … then
Flow control: try … then
then
Text functions: convert
Instructions: convert
convert
Interactive Shell: HistoryHistory[i,1] to html Text functions: convert
Instructions: convert
convert
Interactive Shell: HistoryHistory[i,3] to html Instructions: putput Styled( style, "<p>" # Interactive Shell: HistoryHistory[i,1] # ": " # Interactive Shell: HistoryHistory[i,3] # Constants: nlnl ) i-- Flow control: do … looploop Flow control: end
Shell Immediate Commands: exit, quit, end
end
Flow control: if … then
Flow control: try … then
then
/* ----------------------------------------------------------------------- Action == Empty Operators: Boolean Or with Variable "||="
Operators: Bitwise Or with Variable "|="
Operators: Bitwise Or "|"
Operators: Boolean Or "||"
or
bogus => empty frame */ Instructions: putput "<body", Style.Body, ">\n" Flow control: if … thenif Action!="Empty" Instructions: var
How does VScript::Value() work?: Var*&
var
i=0 Flow control: do … loopdo Flow control: whilewhile ++i<=argc Instructions: putput "<p>", Vipsi command syntax: Identifiers (names)
Identifiers, names
Operators: Make Identifier "@"
Text functions: name
Glossary: Name, Identifier
name
List functions: globals
Shell Immediate Commands: globals
globals
[i], " = ", List functions: globals
Shell Immediate Commands: globals
globals
[i] Flow control: do … looploop Flow control: if … then
Flow control: try … then
then
Flow control: end
Shell Immediate Commands: exit, quit, end
end
chat.sessions
/*  List functions: thisthis Text functions: file
Instructions: file
file
is a dump of Instructions: var
How does VScript::Value() work?: Var*&
var
Sessions */ { { "Username", "Password" }, { "User2","Password2" } }
chat.history
/*  List functions: thisthis Text functions: file
Instructions: file
file
is a dump of Instructions: var
How does VScript::Value() work?: Var*&
var
Interactive Shell: HistoryHistory */ { { "User", "SesisonID", "example message" } }

Valid HTML   Valid CSS