$!****************************************************************************** $! $! Copyright 2016 by Timmers IT Consultancy $! All rights reserved. $! $! This software is furnished under a license and may be used and copied $! only in accordance with the terms of such license and with the $! inclusion of the above copyright notice. This software or any other $! copies thereof may not be provided or otherwise made available to any $! other person. No title to and owneRSHip of the software is hereby $! transferred. $! $! The information in this software is subject to change without notice $! and should not be construed as a commitment by Timmers IT Consultancy. $! $!****************************************************************************** $! $! File: SMIC_WEB:[COM]SHOWHELP.COM $! Creation date: 15-NOV-2016 11:02:16.57 $! Description: $! $! $! $! $! $! $!****************************************************************************** $ $ helpfile = P1 $ numbernbsp = F$INTEGER(P2) $ $ IF helpfile .EQS. "" THEN EXIT $ $ helpfile = f$parse(helpfile,"*.*",,"NAME") + f$parse(helpfile,"*.*",,"TYPE") $ $ usertaal = "engels" $ IF usrpwd_usertaal .EQS. "N" THEN usertaal = "nederlands" $ IF usrpwd_usertaal .EQS. "E" THEN usertaal = "engels" $ IF usrpwd_usertaal .EQS. "D" THEN usertaal = "duits" $ IF usrpwd_usertaal .EQS. "F" THEN usertaal = "frans" $ $ helpfilefound = f$search("wasd_root:[SMiC.helpfiles.''usertaal'...]''helpfile'") $ if helpfilefound .eqs. "" $ then $ helpfilefound = f$search("wasd_root:[SMiC.helpfiles.''usertaal'.new...]''helpfile'") $ if helpfilefound .nes. "" then helpfiletype = 2 $ else $ helpfiletype = 1 $ endif $ helpfilefound = F$PARSE(helpfilefound,"*.html") $ helpfilefound = F$SEARCH(helpfilefound) $ IF helpfilefound .EQS. "" $ THEN $ helpfilefound = f$search("wasd_root:[SMiC.helpfiles.engels...]''helpfile'") $ helpfilefound = F$PARSE(helpfilefound,"*.html") $ helpfilefound = F$SEARCH(helpfilefound) $ helpfiletype = 1 $ IF helpfilefound .EQS. "" $ THEN $ helpfilefound = f$search("wasd_root:[SMiC.helpfiles.nederlands...]''helpfile'") $ helpfilefound = F$PARSE(helpfilefound,"*.html") $ helpfilefound = F$SEARCH(helpfilefound) $ helpfiletype = 1 $ IF helpfilefound .EQS. "" THEN EXIT $ ENDIF $ ENDIF $ $ helpfilename = f$parse(helpfilefound,,,"NAME") + f$parse(helpfilefound,,,"TYPE") $ $ sh symb helpfiletype $ CALL gethtmlsize_'helpfiletype "''helpfilefound'" $ $ helpfilefound = f$edit(helpfilefound,"lowercase") $ helpfilefound = helpfilefound - "wasd_root:[" $ helpfilefound = "/" + helpfilefound $ $ helpfileweb = F$ELEMENT(0,";",helpfilefound) $ @SMiC_WEB:[COM]vervang "''helpfileweb'" "/" "]" $ helpfileweb = newstring $ @SMiC_WEB:[COM]vervang "''helpfileweb'" "/" "." $ helpfileweb = F$EDIT(newstring,"lowercase") $ helpfileweb = F$EXTRACT(0,F$LOCATE("/html",helpfileweb),helpfileweb) + ".html" $ helpfileweb = "''html_documentatie'''helpfileweb'" $ helpfileweb = F$EDIT(helpfileweb,"lowercase") $ $ nbsstring = "" $ teller = 0 $maaknbsstring: $ IF teller .LT. numbernbsp $ THEN $ nbsstring = nbsstring + " " $ teller = teller + 1 $ GOTO maaknbsstring $ ENDIF $ WRITE SYS$OUTPUT "''nbsstring'" $ @smic_web:[java]window_open_help "''helpfileweb'" "''htmlwidth'" "''htmlheight'" $ WRITE SYS$OUTPUT "''nbsstring'" $ $ EXIT $!================================================================================================================================ $gethtmlsize_1: SUBROUTINE $ $ htmlhelpfile = P1 $ $ htmlwidth == 0 $ htmlheight == 0 $ $ CLOSE\/NOLOG htmlfile $ OPEN/READ htmlfile 'htmlhelpfile $htmlreadloop: $ READ/END_OF_FILE=eindehtmlfile htmlfile htmlrecord $ IF F$LOCATE("z-index:",htmlrecord) .EQ. F$LENGTH(htmlrecord) THEN GOTO htmlreadloop $ posleft = F$EXTRACT(F$LOCATE("left:",htmlrecord),999,htmlrecord) $ posleft = F$ELEMENT(0," ",F$ELEMENT(1,":",posleft)) - "px;" $ postop = F$EXTRACT(F$LOCATE("top:",htmlrecord),999,htmlrecord) $ postop = F$ELEMENT(0," ",F$ELEMENT(1,":",postop)) - "px;" $ poswidth = F$EXTRACT(F$LOCATE("width:",htmlrecord),999,htmlrecord) $ poswidth = F$ELEMENT(0," ",F$ELEMENT(1,":",poswidth)) - "px;" $ posheight = F$EXTRACT(F$LOCATE("height:",htmlrecord),999,htmlrecord) $ posheight = F$ELEMENT(0," ",F$ELEMENT(1,":",posheight)) - "px;" $ poshtmlwidth = F$INTEGER(posleft) + F$INTEGER(poswidth) $ poshtmlheight = F$INTEGER(postop) + F$INTEGER(posheight) $ IF poshtmlwidth .GT. htmlwidth THEN htmlwidth == poshtmlwidth $ IF poshtmlheight .GT. htmlheight THEN htmlheight == poshtmlheight $ GOTO htmlreadloop $eindehtmlfile: $ CLOSE\/NOLOG htmlfile $ $ if htmlwidth .lt. 100 then htmlwidth == 90 $ if htmlheight .lt. 100 then htmlheight == 90 $ $ htmlwidth == htmlwidth + 10 $ htmlheight == htmlheight + 10 $ $ EXIT $ENDSUBROUTINE ! gethtmlsize_1 $!================================================================================================================================ $gethtmlsize_2: SUBROUTINE $ $ htmlhelpfile = P1 $ $ htmlwidth == 0 $ htmlheight == 0 $ $ CLOSE\/NOLOG htmlfile $ OPEN/READ htmlfile 'htmlhelpfile $htmlreadloop: $ READ/END_OF_FILE=eindehtmlfile htmlfile htmlrecord $ IF f$extract(0,4,htmlrecord) .EQS. "top:" $ then $ postop = htmlrecord - "pos: " - "px;" $ endif $ IF f$extract(0,5,htmlrecord) .EQS. "left:" $ posleft = htmlrecord - "left: " - "px;" $ then $ endif $ IF f$extract(0,6,htmlrecord) .EQS. "width:" $ then $ poswidth = htmlrecord - "width: " - "px;" $ endif $ IF f$extract(0,7,htmlrecord) .EQS. "height:" $ then $ posheight = htmlrecord - "height: " - "px;" $ endif $ sh symb pos* $ poshtmlwidth = F$INTEGER(posleft) + F$INTEGER(poswidth) $ poshtmlheight = F$INTEGER(postop) + F$INTEGER(posheight) $ IF poshtmlwidth .GT. htmlwidth THEN htmlwidth == poshtmlwidth $ IF poshtmlheight .GT. htmlheight THEN htmlheight == poshtmlheight $ GOTO htmlreadloop $eindehtmlfile: $ CLOSE\/NOLOG htmlfile $ $ if htmlwidth .lt. 100 then htmlwidth == 90 $ if htmlheight .lt. 100 then htmlheight == 90 $ $ htmlwidth == htmlwidth + 10 $ htmlheight == htmlheight + 10 $ $ EXIT $ENDSUBROUTINE ! gethtmlsize_2 $!================================================================================================================================