Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: my personal swf game archive checker html batch script  (Read 16069 times)

0 Members and 1 Guest are viewing this topic.

snowcatman

    Topic Starter


    Beginner

    • Experience: Beginner
    • OS: Windows 8
    my personal swf game archive checker html batch script
    « on: March 22, 2014, 12:11:22 PM »
    Ok, i am playing dumb... ::)

    I download flash games to play when I am offline and to entertain my younger kid's.
    Its all on my external hard drive. for portability.
    I need a way to have each swf game in its own sub directory and have its own html file made for it in the same sub directory.
    Then I need a main html file point to each game html file in those sub directories.

    Its becoming a nice collection. But I am getting board doing this manually.

    i think, the things i need to have are:
    sample.html
    for template html code.

    swf-game-checker-html-directories.bat
    for the workhorse of the automation job.

    -----------------------------------
    sample.html file
    -----------------------------------
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
    <head>
    <title>sample-game-html.swf</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <script type="text/javascript" src="scripts/swfobject.js"></script>
    <script type="text/javascript">
    swfobject.registerObject("flashId", "9.0.0", "flash/expressInstall.swf");
    </script>
    </head>
    <body>
    <center>
    <div>
    <object id="flashId" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="800" height="600">
    <param name="movie" value="sample-game-html.swf" />
    <param name="FlashVars" value="name=Dr.Solve"/>
    <!--[if !IE]>-->
    <object type="application/x-shockwave-flash" data="sample-game-html.swf" width="800" height="600">
    <param name="FlashVars" value="name=Dr.Solve"/>
    <!--<![endif]-->
    <div>
    <h1>Alternative content</h1>
    <p>Get Adobe Flash player</p>
    </div>
    </center>
    <!--[if !IE]>-->
    </object>
    <!--<![endif]-->
    </object>
    </div>
    </body>
    </html>
    -------------------------------------------------------
    swf-game-checker-html-directories.bat
    -------------------------------------------------------
    @rem logonwallpaper.bat
    @ECHO OFF
    @SETLOCAL ENABLEEXTENSIONS
    @cd /d "%~dp0"

    DEL ERROR.LOG

    >>"%~dp0\error.log" 2>&1 echo -------------------------begining of batch script-------------------------
    >>"%~dp0\error.log" 2>&1 echo ==========================================================================
    >>"%~dp0\error.log" 2>&1 echo started SWF GAME HTML script year%date:~-4,4%,day%date:~-7,2%,month%date:~-10,2%,time%time:~-11,2%,%time:~-8,2%.
    >>"%~dp0\error.log" 2>&1 echo ==========================================================================



    ECHO PART ONE
    >>"%~dp0\error.log" 2>&1 echo PART ONE
    ECHO.
    >>"%~dp0\error.log" 2>&1 echo %CD%
    DIR/W
    ECHO.
    ECHO %CD%
    ECHO.
    ECHO THIS IS JUST A STARTING POINT...
    PAUSE > NUL
    CLS

    >>"%~dp0\error.log" 2>&1 echo ....................................... ......
    ECHO PART tWO
    >>"%~dp0\error.log" 2>&1 echo PART tWO

    PAUSE > NUL
    CLS


    >>"%~dp0\error.log" 2>&1 echo =======================================================================
    >>"%~dp0\error.log" 2>&1 echo --------------------------end of batch script--------------------------


    -------------------------------------------------------
    I feel like I have writers block. or something....
    I know, I know... I think I can, I think, I think I can!  :P

    snowcatman

      Topic Starter


      Beginner

      • Experience: Beginner
      • OS: Windows 8
      Re: my personal swf game archive checker html batch script
      « Reply #1 on: March 22, 2014, 12:27:10 PM »
      ECHO PART TWO
      >>"%~dp0\error.log" 2>&1 echo PART tWO
      >>"%~dp0\error.log" 2>&1 echo ....................................... ......
      ECHO.
      :: UM, CHECK EACH SUB DIRECTORY
      :: I GUESS I COULD START OFF SAYING IF SWF AND HTML EXISTS THEN NEXT.
      :: THEN IF SWF FILE EXIST AND NO HTML THEN CREATE HTML WITH SAMPLE AND CHANGE TXT IN HTML
      :: THEN GO TO NEXT DIRECTORY
      PAUSE > NUL
      CLS

      snowcatman

        Topic Starter


        Beginner

        • Experience: Beginner
        • OS: Windows 8
        Re: my personal swf game archive checker html batch script
        « Reply #2 on: March 22, 2014, 01:09:12 PM »
        ok taking a break will work on this a little later. kind hope you have some ideas for me. thank you.


        ECHO PART TWO
        >>"%~dp0\error.log" 2>&1 echo PART tWO
        >>"%~dp0\error.log" 2>&1 echo ....................................... ......
        ECHO.
        :: UM, CHECK EACH SUB DIRECTORY
        :: I GUESS I COULD START OFF SAYING IF SWF AND HTML EXISTS THEN NEXT.
        :: THEN IF SWF FILE EXIST AND NO HTML THEN CREATE HTML WITH SAMPLE AND CHANGE TXT IN HTML
        :: THEN GO TO NEXT DIRECTORY

        for /d %%a in (*) do (
           if exist "%%a\*.swf && %%a\*.html" . null &&goto addhtml

        :addhtml
        copy sample.html %%a | edit said file replacing "sample-game-html.swf" with name of current file in directory

        PAUSE > NUL
        CLS

        Lemonilla



          Apprentice

        • "Too sweet"
        • Thanked: 70
        • Computer: Specs
        • Experience: Experienced
        • OS: Windows 7
        Re: my personal swf game archive checker html batch script
        « Reply #3 on: March 22, 2014, 01:32:13 PM »
        I look forward to seeing where this goes.  I'll see if I can do some work on it when I have time.
        Quote from: patio
        God Bless the DOS Helpers...
        Quote
        If it compiles, send the files.

        snowcatman

          Topic Starter


          Beginner

          • Experience: Beginner
          • OS: Windows 8
          Re: my personal swf game archive checker html batch script
          « Reply #4 on: March 22, 2014, 04:23:12 PM »
          I cleaned it up a little. put i don't think it doing what i want yet.....

          ECHO PART TWO
          >>"%~dp0\error.log" 2>&1 echo ....................................... ......
          >>"%~dp0\error.log" 2>&1 echo PART TWO

          ECHO.
          :: UM, CHECK EACH SUB DIRECTORY
          :: I GUESS I COULD START OFF SAYING IF SWF AND HTML EXISTS THEN NEXT.
          :: THEN IF SWF FILE EXIST AND NO HTML THEN CREATE HTML WITH SAMPLE AND CHANGE TXT IN HTML
          :: THEN GO TO NEXT DIRECTORY
          >>"%~dp0\error.log" 2>&1 echo %CD%
          ECHO %CD%
          ECHO.

          for /d /r %%a in (*) do (
             if exist "%%a\*.swf" >>"%~dp0\error.log" 2>&1 echo found swf&& goto checkhtml
          )
          echo File does not exist.

          :checkhtml

          for /d /r %%a in (*) do (
             if exist "%%a\*.html" >>"%~dp0\error.log" 2>&1 echo found html&&goto continue
          )
          echo File does not exist.

          :continue
          >>"%~dp0\error.log" 2>&1 echo Rest of your code here.
          echo done


          PAUSE > NUL
          CLS

          snowcatman

            Topic Starter


            Beginner

            • Experience: Beginner
            • OS: Windows 8
            Re: my personal swf game archive checker html batch script
            « Reply #5 on: March 22, 2014, 07:20:08 PM »
            ECHO PART TWO
            >>"%~dp0\error.log" 2>&1 echo ....................................... ......
            >>"%~dp0\error.log" 2>&1 echo PART tWO
            ECHO.
            :: UM, CHECK EACH SUB DIRECTORY
            :: I GUESS I COULD START OFF SAYING IF SWF AND HTML EXISTS THEN NEXT.
            :: THEN IF SWF FILE EXIST AND NO HTML THEN CREATE HTML WITH SAMPLE AND CHANGE TXT IN HTML
            :: THEN GO TO NEXT DIRECTORY
            >>"%~dp0\error.log" 2>&1 echo %CD%
            ECHO %CD%
            for /f "tokens=1-2 delims=;" %%i in ('dir /s /b') do (
               copy "test.html" "%%~dpI" >>"%~dp0\error.log" 2>&1
               )

            PAUSE > NUL
            CLS

            ok, did some online researching.  whats slowing me down is i don't know dos batching.
             i did this in a test environment and it almost does what i want. made a mess thew..
             
            i am putting a modified log file here:
            -------------------------begining of batch script-------------------------
            ==========================================================================
            started SWF GAME HTML script year2014,day22,month03,time18,09.
            ==========================================================================
            PART ONE
            G:\flashgames\flashgames batch test\All-Games\Games
            ....................................... ......
            PART tWO
            G:\flashgames\flashgames batch test\All-Games\Games

               about five hundred of these lines below "1 file(s) copied."
                    1 file(s) copied.
                    1 file(s) copied.
                    1 file(s) copied.
                    1 file(s) copied.
                    1 file(s) copied.
                    1 file(s) copied.
                    1 file(s) copied.

            =======================================================================
            --------------------------end of batch script--------------------------

            yet i went in and deleted the test.html of the last game folder so as to see that it copied. and after i run the batch file its still not there.

            foxidrive



              Specialist
            • Thanked: 268
            • Experience: Experienced
            • OS: Windows 8
            Re: my personal swf game archive checker html batch script
            « Reply #6 on: March 22, 2014, 10:29:18 PM »
            The HTML file in each game folder just has a few minor changes for each folder right?  What changes do you want to make?

            You'd create the HTML file in each folder in a loop, and add the changes as you go.

            Then a second loop will let you gather the html filenames to put in a menu.

            snowcatman

              Topic Starter


              Beginner

              • Experience: Beginner
              • OS: Windows 8
              Re: my personal swf game archive checker html batch script
              « Reply #7 on: March 23, 2014, 07:02:39 AM »
              yes foxidrive.   ;D

              what you said is right on the mark. far as i can tell..

              Also I want to be able to reuse the script later as I
              add new swf file to there own folders as i collect them.
              so as not to modify the the previous games. just
              add/modify the new games in there folders.

              The change in the html is to replace all the
              text "sample-game-html.swf" with the name
              of the swf file in each game folder.
              in the html i left in the beginning of this post
              you will notice there are three places sample-game-html.swf exists.

              in folder \games\abc
              there is abc.swf by itself.
              copy of sample.html should be added and named abc.html
              and edited to reflect the changes
              example: sample-game-html.swf  replaced with ---> abc.swf in the html file
              next folder

              I would love some link's and/or a short description
              of what the script you would show me does.

              e.g. like
              tokens=1-2 delims=
              %%~dpI
              does and how it comes together. i think i am
              just on the clasp of learning this stuff.
              I know there is a lot more to learn than meets the eye.  :)
              thank you.

              « Last Edit: March 23, 2014, 07:24:56 AM by snowcatman »

              foxidrive



                Specialist
              • Thanked: 268
              • Experience: Experienced
              • OS: Windows 8
              Re: my personal swf game archive checker html batch script
              « Reply #8 on: March 23, 2014, 09:08:17 AM »
              This uses d:\games (two references) and creates the HTML code if it doesn't already exist.

              It uses the directory name for the HTML file and puts the SWF filename inside the HTML.
              A list is created of the new HTML files in the "d:\games\menulist.txt" file.

              You could really recreate every HTML file every time it is run - it wouldn't take long - and that will give you a full list of every game in the "d:\games\menulist.txt" file every time

              The characters that need to be escaped in the HTML script are < > ) | ^ & and are escaped with a ^ character.


              Code: [Select]
              @echo off
              for /d /r "d:\games" %%a in (*) do (
                  if exist "%%a\*.swf" if not exist "%%a\%%~nxa.html" (
                     for %%b in ("%%a\*.swf") do (

              (
              echo ^<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"^>
              echo ^<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"^>
              echo ^<head^>
              echo ^<title^>%%~nxb^</title^>
              echo ^<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /^>
              echo ^<script type="text/javascript" src="scripts/swfobject.js"^>^</script^>
              echo ^<script type="text/javascript"^>
              echo swfobject.registerObject("flashId", "9.0.0", "flash/expressInstall.swf"^);
              echo ^</script^>
              echo ^</head^>
              echo ^<body^>
              echo ^<center^>
              echo ^<div^>
              echo ^<object id="flashId" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="800" height="600"^>
              echo ^<param name="movie" value="%%~nxb" /^>
              echo ^<param name="FlashVars" value="name=Dr.Solve"/^>
              echo ^<!--[if !IE]^>--^>
              echo ^<object type="application/x-shockwave-flash" data="%%~nxb" width="800" height="600"^>
              echo ^<param name="FlashVars" value="name=Dr.Solve"/^>
              echo ^<!--^<![endif]--^>
              echo ^<div^>
              echo ^<h1^>Alternative content^</h1^>
              echo ^<p^>Get Adobe Flash player^</p^>
              echo ^</div^>
              echo ^</center^>
              echo ^<!--[if !IE]^>--^>
              echo ^</object^>
              echo ^<!--^<![endif]--^>
              echo ^</object^>
              echo ^</div^>
              echo ^</body^>
              echo ^</html^>
              ) > "%%a\%%~nxa.html"

              )
              echo "%%a\%%~nxa.html" >> "d:\games\menulist.txt"
              )
              )


              snowcatman

                Topic Starter


                Beginner

                • Experience: Beginner
                • OS: Windows 8
                Re: my personal swf game archive checker html batch script
                « Reply #9 on: March 23, 2014, 09:48:47 AM »
                I like it. i tried this in my virtual box and it works great.
                but when i used it on my host machine it spit out errors.

                can this be made mobile and is there a way to log it?

                i tried changing the "d\games" to "%~dp0\" and it does put the html in the folders

                your statement got me thinking.
                This uses d:\games (two references) and creates the HTML code if it doesn't already exist.
                (two references), i know i am missing something.

                but then the batch cuts off.

                log show's that script did not end after were i put the code in you wrote and i changed.
                error in consul is "The system cannot find the path specified."
                thank you.

                foxidrive



                  Specialist
                • Thanked: 268
                • Experience: Experienced
                • OS: Windows 8
                Re: my personal swf game archive checker html batch script
                « Reply #10 on: March 23, 2014, 10:39:06 AM »
                To make it run from the current folder:

                remove "d\games"
                change "d:\games\menulist.txt" to "menulist.txt"


                snowcatman

                  Topic Starter


                  Beginner

                  • Experience: Beginner
                  • OS: Windows 8
                  Re: my personal swf game archive checker html batch script
                  « Reply #11 on: March 23, 2014, 11:42:46 AM »
                  thank you foxidrive that did the trick.
                  going to look-up what your script does. wished i understood some of it

                  %%a\%%~nxa.html

                  this for and if loop i am trying to understand. is there a link witch enplanes it more in detail? i get some of the simple examples but somehow i don't see how you pulled it off. wished i understood it. i think i get lost in some of the terminology of batch scripting


                  not that i want you to do all the work do i just double the effort to make a master html. i was thinking you have the list so maybe i need to refer to another bat file to append the list findings to a current html file?

                  i also notice you set the list file will not change unless there is a successful html made in a swf directory.
                  « Last Edit: March 23, 2014, 12:38:11 PM by snowcatman »

                  snowcatman

                    Topic Starter


                    Beginner

                    • Experience: Beginner
                    • OS: Windows 8
                    Re: my personal swf game archive checker html batch script
                    « Reply #12 on: March 23, 2014, 09:23:14 PM »
                    Ok this is what i ended with. it works and all. thank you foxidrive
                        bet you can clean it up a bit. but remember i need to be mobile. As i use a usb hard drive. thank you

                    I also want to add some more logging to this script. too.

                    ==================================================

                    @rem logonwallpaper.bat
                    @ECHO OFF
                    @SETLOCAL ENABLEEXTENSIONS
                    @cd /d "%~dp0"
                    DEL ERROR.LOG

                    >>"%~dp0\error.log" 2>&1 echo -------------------------begining of batch script-------------------------
                    >>"%~dp0\error.log" 2>&1 echo. ==========================================================================
                    >>"%~dp0\error.log" 2>&1 echo started SWF GAME HTML script year%date:~-4,4%,day%date:~-7,2%,month%date:~-10,2%,time%time:~-11,2%,%time:~-8,2%.
                    >>"%~dp0\error.log" 2>&1 echo. ==========================================================================

                    echo -------------------------begining of batch script-------------------------
                    echo ==========================================================================
                    echo started SWF GAME HTML script year%date:~-4,4%,day%date:~-7,2%,month%date:~-10,2%,time%time:~-11,2%,%time:~-8,2%.
                    echo. ==========================================================================
                    echo.
                    echo.



                    >>"%~dp0\error.log" 2>&1 echo -----------Part One ------------
                    ECHO PART ONE
                    >>"%~dp0\error.log" 2>&1 echo PART ONE
                    ECHO.
                    >>"%~dp0\error.log" 2>&1 echo %CD%
                    DIR/W
                    ECHO.
                    ECHO %CD%
                    ECHO.
                    ECHO THIS IS JUST A STARTING POINT...
                    pause
                    cls

                    echo Cleanup
                    >>"%~dp0\error.log" 2>&1 echo  ------- Cleanup -------
                    >>"%~dp0\error.log" 2>&1 del /s *.html
                    >>"%~dp0\error.log" 2>&1 echo  ----- End Cleanup -----
                    >>"%~dp0\error.log" 2>&1 echo.
                    echo.
                    echo cleanup finnished
                    pause




                    ECHO PART TWO
                    >>"%~dp0\error.log" 2>&1 echo ....................................... ......
                    >>"%~dp0\error.log" 2>&1 echo PART TWO

                    ECHO.
                    :: UM, CHECK EACH SUB DIRECTORY
                    :: I GUESS I COULD START OFF SAYING IF SWF AND HTML EXISTS THEN NEXT.
                    :: THEN IF SWF FILE EXIST AND NO HTML THEN CREATE HTML WITH SAMPLE AND CHANGE TXT IN HTML
                    :: THEN GO TO NEXT DIRECTORY
                    >>"%~dp0\error.log" 2>&1 echo %CD%
                    ECHO %CD%
                    ECHO.
                    ECHO Update Operation In Progress - Please Stand By...
                    echo ^<!DOCTYPE HTML PUBLIC^> >>index.html
                    echo ^<html^> >>index.html
                    ECHO ^<body^> >>index.html
                    for /d /r %%a in (*) do (
                        if exist "%%a\*.swf" if not exist "%%a\%%~nxa.html" (
                           for %%b in ("%%a\*.swf") do (

                    (
                    echo ^<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"^>
                    echo ^<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"^>
                    echo ^<head^>
                    echo ^<title^>%%~nxb^</title^>
                    echo ^<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /^>
                    echo ^<script type="text/javascript" src="scripts/swfobject.js"^>^</script^>
                    echo ^<script type="text/javascript"^>
                    echo swfobject.registerObject("flashId", "9.0.0", "flash/expressInstall.swf"^);
                    echo ^</script^>
                    echo ^</head^>
                    echo ^<body^>
                    echo ^<center^>
                    echo ^<div^>
                    echo ^<object id="flashId" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="800" height="600"^>
                    echo ^<param name="movie" value="%%~nxb" /^>
                    echo ^<param name="FlashVars" value="name=Dr.Solve"/^>
                    echo ^<!--[if !IE]^>--^>
                    echo ^<object type="application/x-shockwave-flash" data="%%~nxb" width="800" height="600"^>
                    echo ^<param name="FlashVars" value="name=Dr.Solve"/^>
                    echo ^<!--^<![endif]--^>
                    echo ^<div^>
                    echo ^<h1^>Alternative content^</h1^>
                    echo ^<p^>Get Adobe Flash player^</p^>
                    echo ^</div^>
                    echo ^</center^>
                    echo ^<!--[if !IE]^>--^>
                    echo ^</object^>
                    echo ^<!--^<![endif]--^>
                    echo ^</object^>
                    echo ^</div^>
                    echo ^</body^>
                    echo ^</html^>
                    ) > "%%a\%%~nxa.html"


                    )



                    @rem echo "%%a\%%~nxa.html" >> "%~dp0\index.html"
                    echo ^<a href="%%a\%%~nxa.html"^>%%~nxa.html^</a^>^<br^> >> "%~dp0\index.html"

                    )
                    )


                    echo ^<!-- more content --^> >>index.html
                    echo ^<!-- you don't need to escape ( ) outside blocks --^> >>index.html
                    echo ^<!-- don't escape inside quotes "&" --^> >>index.html
                    ECHO ^</body^> >>index.html
                    echo ^</html^> >>index.html


                    echo.

                    ECHO END OF SCRIPT
                    ECHO PRESS ANYKEY
                    :: CHOICE DOES NOT WORK TO WAIT X AMOUNT OF SECOUNDS
                    :: CHOICE /C:d /N /Td,3
                    :: FOR %%D IN (40 40) DO CHOICE /C:d /N /Td,40
                    PAUSE
                    CLS


                    >>"%~dp0\error.log" 2>&1 echo =======================================================================
                    >>"%~dp0\error.log" 2>&1 echo --------------------------end of batch script--------------------------
                    @endlocal


                    ================================================


                    foxidrive



                      Specialist
                    • Thanked: 268
                    • Experience: Experienced
                    • OS: Windows 8
                    Re: my personal swf game archive checker html batch script
                    « Reply #13 on: March 24, 2014, 12:00:52 AM »

                    %%a\%%~nxa.html

                    this for and if loop i am trying to understand.

                    %%a contains the full path to every folder below the current folder (when "d:\games" isn't used) and in all subfolders

                    %%~nxa contains the name and extension, which is the last folder in the full path of %%a
                    You see CMD doesn't know or care that the last part is a folder or a filename.exe so in this case the FOR metavariables treats it like an extensionless filename - or with an extension if the folder contains a period.

                    As an example if the folder in %%a were c:\windows\system32 then %%~nxa would return system32

                    You can see the FOR modifiers on the last page of the help: type FOR /?


                    If you want further explanation then tell me which parts you need explained and what you think they do.   That makes explaining an easier process.

                    snowcatman

                      Topic Starter


                      Beginner

                      • Experience: Beginner
                      • OS: Windows 8
                      Re: my personal swf game archive checker html batch script
                      « Reply #14 on: March 24, 2014, 06:29:47 AM »
                      thank you again foxidrive....

                      so as to remember this i am adding it to my batch.
                      =================================================
                      ECHO.
                      :: UM, were using a "for" and "if" statement to check if there is a "*.swf" in any directory
                      :: "%%a" contains the full path to every folder below the current folder
                      :: So then were are creating a .html with "%%~nxa.html" name of "*.swf"
                      :: and another "for" statment does, um assuming %%b veribale grab's the file name of the swf.
                      :: and the "do" uses the commands fallowing. and somehow this "%%~nxb" is used to
                      :: tell the script were the names are to go in the html files
                      :: thank you foxidrive for you understanding and help.
                      >>"%~dp0\error.log" 2>&1 echo %CD%
                      ECHO %CD%
                      ECHO.
                      ECHO Update Operation In Progress - Please Stand By...
                      echo ^<!DOCTYPE HTML PUBLIC^> >>index.html
                      echo ^<html^> >>index.html
                      ECHO ^<body^> >>index.html


                      for /d /r %%a in (*) do (
                          if exist "%%a\*.swf" if not exist "%%a\%%~nxa.html" (
                             for %%b in ("%%a\*.swf") do (

                      (
                      echo ^<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"^>
                      echo ^<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"^>
                      echo ^<head^>
                      echo ^<title^>%%~nxb^</title^>
                      ====================================================
                      i am slowly learning this i think. so did must have a few thing not said right, but hopefully i am close.
                      ------------------------------------------------
                      I think I can I think I can I think I can.