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

inserting multiple images in an HTML doc

Expand Messages
  • Mike Breiding - Morgantown WV
    Can anyone tell me how to add multiple images to an html doc rather than have to add them one at a time using Image clip? I want generate a page which will
    Message 1 of 3 , Jun 23, 2005
    • 0 Attachment
      Can anyone tell me how to add multiple images to an html doc rather than
      have to add them one at a time using "Image" clip?

      I want generate a page which will consist of photos such as:
      http://mbreiding.us/ert/sampler/

      Thanks,
      -Mike

      [Non-text portions of this message have been removed]
    • John Zeman
      ... The Images to HTML clip in the default Utilities library will do this to some extent, or you could try the one below which I just wrote (I ve been
      Message 2 of 3 , Jun 23, 2005
      • 0 Attachment
        --- In ntb-html@yahoogroups.com, Mike Breiding - Morgantown WV <mike@M...> wrote:
        >
        > Can anyone tell me how to add multiple images to an html doc rather than
        > have to add them one at a time using "Image" clip?
        >
        > I want generate a page which will consist of photos such as:
        > http://mbreiding.us/ert/sampler/
        >
        >


        The "Images to HTML" clip in the default Utilities
        library will do this to some extent, or you could
        try the one below which I just wrote (I've been
        meaning to create this for a long time anyway, so
        I appreciate the push).

        Unlike the Images to HTML clip, the one below
        allows you to pick and choose your images. Just
        hold down the CTRL key while left clicking to
        select individual images, or the SELECT key to
        select a range of images in any given directory.
        After the first time you use it, the clip should
        remember the last location you selected your
        images from.

        The clip puts all the images into a block at the
        point where your cursor is, it doesn't insert line
        breaks or anything else, however it could be
        modified to do so.

        John


        ;Insert Multiple Images
        ^!ProgIniSave

        ; begin one long line
        ^!SetArray %IMAGES%=^?{(T=O;S=M;C=L;F="Images (*.bmp;*.gif;*.jpg;*.jpeg;*.png)|*.bmp;*.gif;*.jpg;*.jpeg;*.png")Select one or more images=^$GetValue("JohnZeman:LastImageLoc")$}
        ; end begin one long line

        ; WRITE IMAGE LOCATION TO THE INI FILE
        ^!SaveValue JohnZeman:LastImageLoc=^$GetPath(^%IMAGES1%)$

        ^!Set %MAX%=^%IMAGES0%
        ^!Set %CNT%=1

        :Loop
        ; CONVERT TO RELATIVE LOCATION
        ^!Set %REL%=^$GetRelativeName(^%IMAGES^%CNT%%;^**)$
        ^!Set %REL%=^$StrReplace("\";"/";"^%REL%";0;0)$
        ^!Set %REL%=^$StrReplace("^%SPACE%";"%20";"^%REL%";0;0)$

        ; GET IMAGE FILE NAME ONLY
        ^!Set %RELNAME%=^$StrSentenceCase("^$GetName(^%IMAGES^%CNT%%)$")$

        ; INSERT THE CODE (one long line)
        ^!InsertHtml <img src="^%REL%" width="^$GetImgWidth(^%IMAGES^%CNT%%)$" height="^$GetImgHeight(^%IMAGES^%CNT%%)$" alt="^%RELNAME%">

        ^!Inc %CNT%
        ^!If "^%CNT%" <= "^%MAX%" ^!GoTo Loop
      Your message has been successfully submitted and would be delivered to recipients shortly.