Loading ...
Sorry, an error occurred while loading the content.

15008Images to HTML clip

Expand Messages
  • Mike Breiding
    May 6, 2006

      Below is the Images to HTML clip I have modified to my liking. ( See:
      http://mbreiding.us/hosta_id/ )
      When ever I run the clip I get a flash of the black DOS box and then the
      page is generated.
      Apparently without errors.
      Is this normal or have i introduced a error into the clip.

      I am running XP Pro SP2.


      ;This Clip will create a web page based on all the images that match the
      specified criteria. You can then easily preview all the images in your
      favorite browser

      ;Prompt user with Clip wizard to determine which image files should be
      listed and how the page should be built

      ^!Set %PageTitle%=^?{Page title=Images}; %FileName%=^?{Web page file name
      (no path or extension)=Images}; %Directory%=^?{(T=D)Directory to search};
      %Specs%=^?{File Specs=*.gif;*.png;*.jpg}; %Sorting%=^?{(T=C)File
      sorting==Unsorted|_Name|Type|Date|Size}; %Reverse%=^?{(T=C)Descending

      ;End procedure if the user canceled the Clip wizard
      ^!IfCancel Exit

      ^!SetPasteIndent Off
      ;Set variable for sorting parameter
      ^!Set %Sorting%=^%Reverse%^%Sorting%
      ;Close the output file if there is one open in NoteTab
      ^!Close "^%Directory%^%FileName%.htm"
      ;Create a new document with specified name for web page
      ^!Set %KeepNameFormat%=^$GetNameFormat$
      ^!SetNameFormat ^%Directory%^%FileName%.htm
      ^!ToolBar New Document
      ^!SetNameFormat ^%KeepNameFormat%
      ;Turn word wrap off
      ^!SetWordWrap OFF
      ;Insert web page header and title
      ^!InsertHtml <HTML>^P<HEAD>^P<TITLE>^%PageTitle%</TITLE>^P<style
      type="text/css">H1 {margin-bottom: 0px} H2 {margin-top: 0px}p {text align:
      left; margin-top: 0px; font: 100%/1.3 Georgia,'Times New
      Roman',Times,serif} #image img {padding:0px; border: solid #000 1px}#image
      {margin-bottom: 40px}div#footer
      {clear:both;color:#fff;background:#96A274;border:none;font:90% Georgia,
      "Times New Roman", Times, serif;margin:0 auto;padding:10px
      0;text-align:center;width:100%;}div#footer a:link, div#footer
      a:visited{color:#FFF;margin:0;padding: 0;padding-left: 3px; padding-right:
      6px}div#footer a:hover {color:#000;margin:0;padding: 0;padding-left: 3px;
      padding-right: 6px}</style></HEAD>^P<BODY>^P<CENTER>^P^p<div
      id="title">^p<h1>Title</h1>^p<h2>SubTitle</h2>^p</div>^p<div id="main">
      ;Retrieve first image name that matches specified search criteria
      ^!Set %ImageFullName%=^$GetFileFirst(^%Directory%;"^%Specs%";^%Sorting%)$
      ;If the image name is empty (no more matching files), leave the loop
      ^!IfTrue ^$IsEmpty(^%ImageFullName%)$ ExitLoop
      ;Copy image name without path to variable
      ^!Set %ImageName%=^$GetFileName(^%ImageFullName%)$
      ;Copy image width and height information into variables
      ;^!Set %ImgWidth%=^$GetImgWidth(^%ImageFullName%)$;
      ;Insert image tag and information into document
      ^!InsertText ^p^p
      ^!InsertHtml <div id="image">
      ^!InsertHtml <IMG SRC="^$StrLower("^%ImageName%")$" >

      ^!InsertText ^p^p
      ^!InsertHtml <P>*****COMMENTS******</p>
      ^!InsertHtml </div>
      ;Get next matching image name and go back to start of loop
      ^!Set %ImageFullName%=^$GetFileNext$
      ^!GoTo StartLoop

      ;Close the file-find variable to restore system resources
      ;Insert line break after last image tag
      ^!InsertText ^P
      ;close MAIN div
      ^!InsertHtml </div>^p ^p

      ;Insert footer
      ^!InsertHtml <div id="footer">

      ^!InsertHtml <p>Photo and text © <a
      Breiding</a> ^$GetDate(mmmm dd, yyyy -- tt)$</p>

      ^!InsertHtml </div> ^p

      ;close WRAPPER div
      ^!InsertHtml </div> ^p

      ;Place cursor back to top of page
      ^!Jump Text_Start

      [Non-text portions of this message have been removed]
    • Show all 3 messages in this topic