% FUNCTION GenerateICSCommands(forFile, doc, line1, line2) REM Specify the document to be viewed IF (forFile = True) THEN cdelim = vbNewLine dquote = """" REM Specify the document retval = retval + "ldoc " + doc + cdelim ELSE cdelim = " " dquote = """ END IF pagespec = Request.QueryString("Page") IF (pagespec = "specify") THEN pagespec = Request.QueryString("PageNumber") END IF REM The markup: REM Set transparency on. retval = retval + "onpage " + pagespec + " markup attributes drawmode transparent" + cdelim REM Create "yellow sticky note" retval = retval + "onpage " + pagespec + " markup attributes fgcolor rgb:ff/ff/88" + cdelim retval = retval + "onpage " + pagespec + " markup filledrectangle 0.25 0.25 4.75 1.20" + cdelim REM Add "shadow" for a raised effect retval = retval + "onpage " + pagespec + " markup attributes fgcolor rgb:aa/aa/aa" + cdelim retval = retval + "onpage " + pagespec + " markup filledpolygon 0.30 1.20 4.75 1.20 4.75 0.30 4.80 0.30 4.80 1.25 0.30 1.25" + cdelim REM Draw the text on the "yellow sticky note" retval = retval + "onpage " + pagespec + " markup attributes fgcolor rgb:00/00/99" + cdelim retval = retval + "onpage " + pagespec + " markup text font " + dquote + "face cour size 12 pitchcpi 8" + dquote + cdelim retval = retval + "onpage " + pagespec + " markup text rxloc 0.4 ryloc 0.70 string " + dquote + line1 + dquote + cdelim retval = retval + "onpage " + pagespec + " markup text rxloc 0.4 ryloc 1.00 string " + dquote + line2 + dquote + cdelim REM Add gui controls retval = retval + "gui controls display rightbuttons" + cdelim REM Draw fit-width retval = retval + "draw widetop" GenerateICSCommands = retval END FUNCTION REM ==== REM MAIN REM GetParameters PlainText = Request.QueryString("PlainText") IE = Request.QueryString("IE") SelectedDoc = Request.QueryString("SelectedDoc") Line1 = Request.QueryString("Line1") Line2 = Request.QueryString("Line2") IF (PlainText = "yes") THEN REM We only display the ICS commands, therefore in plain text Response.ContentType = "text/plain" Response.Write("ICS" + vbNewLine) Response.Write(GenerateICSCommands(True, SelectedDoc, Line1, Line2)) ELSE IF (IE = "no") THEN REM Send pure ICS commands Response.ContentType = "application/vnd.SwiftView-ICS" Response.Write("ICS" + vbNewLine) Response.Write(GenerateICSCommands(True, SelectedDoc, Line1, Line2)) ELSE REM If content type is some plugin/ActiveX, IE will generate an REM HTML page containing an EMBED for the plugin/ActiveX. REM This is problematic when used with HTML Forms, so instead REM we generate our own HTML page with a correct EMBED ... Response.ContentType = "text/html" Response.Write(""+vbNewLine) Response.Write("
"+vbNewLine) Response.Write(""+vbNewLine) Response.Write("