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

Re: HTML-tag field and HTML display

Expand Messages
  • Sheri
    ... You could use a clip to open the document with: ^!Mshta ^$GetDocName$ Doubt it would work with intra-document navigation, though. If the document has the
    Message 1 of 10 , Jul 6, 2009
    View Source
    • 0 Attachment
      --- In ntb-clips@yahoogroups.com, "rogue_ronin" <swordplay@...> wrote:
      >
      > On a related note, is there a way to display HTML without opening
      > a full browser? I'm developing an eBook clip library, and I
      > haven't found anything simple. Built into NoteTab would be
      > awesome, but I'll take a simple program that I can call as well.
      > Ideally I could set the window size, and it would have simple
      > scroll and intra-document navigation. No network capacity
      > required.

      You could use a clip to open the document with:

      ^!Mshta "^$GetDocName$"

      Doubt it would work with intra-document navigation, though.

      If the document has the extension .hta, you can put some special tags into it along with a vbscript or jscript script that will set a fixed window size and position.

      See for example the javascript to resize the window in Lotta's example here:

      <http://tech.groups.yahoo.com/group/ntb-clips/message/19165>

      Regards,
      Sheri
    • rogue_ronin
      Lotta-- I ll play with it, now that you ve given me a hint. Any pointers to where it might be explained? ... Sheri, That s great, thank you. If I can figure
      Message 2 of 10 , Jul 6, 2009
      View Source
      • 0 Attachment
        Lotta--

        I'll play with it, now that you've given me a hint. Any pointers to where it might be explained?


        --- In ntb-clips@yahoogroups.com, "Sheri" <silvermoonwoman@...> wrote:

        > You could use a clip to open the document with:
        >
        > ^!Mshta "^$GetDocName$"
        >

        Sheri,

        That's great, thank you. If I can figure a way to insert the resizing code, without modifying the document, it'll be even better!

        Where is the documentation on ^!Mshta? Can't find it in the help file. Maybe I'm just blind.

        Forbidden knowledge! Using NoteTab like a secret society! ;)

        m a r
      • loro
        ... Neat! Lotta
        Message 3 of 10 , Jul 6, 2009
        View Source
        • 0 Attachment
          At 17:33 2009-07-06, Sheri wrote:
          >^!Mshta "^$GetDocName$"

          Neat!

          Lotta
        • loro
          ... I don t think I ve ever used this option, so I m not sure, but I don t think there is any explanation more than the examples under the list of field
          Message 4 of 10 , Jul 6, 2009
          View Source
          • 0 Attachment
            rogue_ronin wrote:
            >I'll play with it, now that you've given me a hint. Any pointers to
            >where it might be explained?

            I don't think I've ever used this option, so I'm not sure, but I
            don't think there is any explanation more than the examples under the
            list of field options...

            ^?[(T=T;C=L/U;F="HTML Files|*.*htm*;*.asp;*.css")Prompt]
            or
            ^?[(T=T;F="Image Files|*.gif;*.png;*.jpg;*.jpeg")Prompt]
            HTML-tag field

            Lotta
          • Sheri
            ... You can put ^! in front of any exe name on your path to execute the exe in a clip. MSHTA.exe (on XP) is in Windows System32. Its purpose is to launch html
            Message 5 of 10 , Jul 7, 2009
            View Source
            • 0 Attachment
              --- In ntb-clips@yahoogroups.com, "rogue_ronin" <swordplay@...> wrote:
              >
              > Lotta--
              >
              > I'll play with it, now that you've given me a hint. Any pointers to where it might be explained?
              >
              >
              > --- In ntb-clips@yahoogroups.com, "Sheri" <silvermoonwoman@> wrote:
              >
              > > You could use a clip to open the document with:
              > >
              > > ^!Mshta "^$GetDocName$"
              > >
              >
              > Sheri,
              >
              > That's great, thank you. If I can figure a way to insert the resizing code, without modifying the document, it'll be even better!
              >
              > Where is the documentation on ^!Mshta? Can't find it in the help file. Maybe I'm just blind.
              >
              > Forbidden knowledge! Using NoteTab like a secret society! ;)
              >
              > m a r
              >

              You can put ^! in front of any exe name on your path to execute the exe in a clip. MSHTA.exe (on XP) is in Windows\System32. Its purpose is to launch html applications, which because they are launched locally, have fewer security issues than html documents viewed in the browser. Because there is less overhead for security, mshta opens faster than the browser. You can google for more info on mshta and hta applications.

              Instead of:
              ^!Mshta "^$GetDocName$"
              you can use:
              ^!Mshta "^**"

              and then if your document has been modified but the changes not yet saved, the viewed version will include the pending changes.

              It looks like links, when they work at all, open a real broswer window.

              If a script is inserted within the head section of a html document it can resize and move the window to a fixed location. The document doesn't have to be an .hta document or have hta tags.

              E.g.:

              <script type="text/javascript">
              <!--
              function MoveandResize()
              {
              window.resizeTo(1007,838);
              window.moveTo(133,86);
              }
              onload = MoveandResize;
              //-->
              </script>

              Regards,
              Sheri
            • rogue_ronin
              ... I d completely forgotten that, I don t think I ve used it since mini-notetab! And of course I m not familiar with mshta.exe -- thanks for the info. ...
              Message 6 of 10 , Jul 7, 2009
              View Source
              • 0 Attachment
                --- In ntb-clips@yahoogroups.com, "Sheri" <silvermoonwoman@...> wrote:
                > You can put ^! in front of any exe name on your path to execute the exe in a clip.

                I'd completely forgotten that, I don't think I've used it since mini-notetab! And of course I'm not familiar with mshta.exe -- thanks for the info.

                > Instead of:
                > ^!Mshta "^$GetDocName$"
                > you can use:
                > ^!Mshta "^**"
                >
                > and then if your document has been modified but the changes not yet saved, the viewed version will include the pending changes.

                Neat-o keen! I was going to append the current doc to a [script + temporary doc] and open the temporary doc. This is shorter, but I'll have to remember to remove the scripting -- no biggie; heck, I'll probably add the scripting, launch mshta and remove it all in one go.

                >
                > It looks like links, when they work at all, open a real browser window.

                Actually, for my test file the intra-document links worked just fine -- I could bounce around inside the document at will. I expect that external links would open a browser -- but I won't be using them for eBooks.

                > If a script is inserted within the head section of a html document it can resize and move the window to a fixed location. The document doesn't have to be an .hta document or have hta tags.

                That's actually what all the ^** fuss is about: I'd like to resize the window to roughly eBook display size. But I don't want to include the resizing code in the final product.

                Thank you, oh NoteTab Princess!

                :)

                m a r
              • rogue_ronin
                Here s a quick clip to add an HTA tag. It doesn t check for incompatibilities (ie: border vs caption, icon is an image, etc.) so be wise. And it doesn t use
                Message 7 of 10 , Jul 8, 2009
                View Source
                • 0 Attachment
                  Here's a quick clip to add an HTA tag.

                  It doesn't check for incompatibilities (ie: border vs caption, icon is
                  an image, etc.) so be wise. And it doesn't use Microsoft's upper-case
                  tags and tabs -- I wanted to use InsertWizardHtml to avoid adding empty
                  tags. (Also, I tried for that format -- but without quotation marks,
                  any empty attribute ate the next attribute as its value. [:-s] ) It
                  generates a tag with the default values for HTA explicitly set so it's a
                  bit bloaty. There are four attributes (APPLICATIONNAME, ICON, BORDER
                  and WINDOWSTATE) that do not have default values. These are preset to be
                  empty. I would suggest changing all the defaults to suit yourself.

                  If you run this and change nothing, it creates a very simple tag:

                  <hta:application>

                  The generated tag works for me, but as always, YMMV.

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

                  H="HTA Application"
                  ;insert HTA:APPLICATION tag
                  ;into head to create HTML Application
                  ;using mshta.exe

                  ;clear variables
                  ^!ClearVariables

                  ;preset dialog presentation
                  ^!SetWizardWidth 200
                  ^!SetWizardTitle "HTA:APPLICATION"
                  ^!SetWizardLabel "Preset to standard default values..."

                  ;dialog
                  ^!Set %APPLICATIONNAME%=^?{HTA's name=^%EMPTY%}; %ICON%=^?{(T=O)Name and
                  location of the icon=^%EMPTY%}; %CAPTION%=^?{(T=C)Display a title
                  bar=_title bar is displayed^=yes|title bar isn't displayed^=no};
                  %MAXIMIZEBUTTON%=^?{(T=C)Maximize button is displayed in the title
                  bar=_maximize button is displayed^=yes|maximize button isn't
                  displayed^=no}; %MINIMIZEBUTTON%=^?{(T=C)Minimize button is displayed in
                  the title bar=_minimize button is displayed^=yes|minimize button isn't
                  displayed^=no}; %SYSMENU%=^?{(T=C)System menu is displayed=_system menu
                  is displayed^=yes|system menu isn't displayed^=no};
                  %SCROLL%=^?{(T=C)Scroll bars are displayed=_scroll bars are
                  displayed^=yes|scroll bars aren't displayed^=no|scroll bars only when
                  the content exceeds client area^=auto}; %SCROLLFLAT%=^?{(T=C)Scroll bar
                  is 3-D or flat=scroll bars are flat^=yes|_scroll bars are 3-D^=no};
                  %CONTEXTMENU%=^?{(T=C)Context menu when the right mouse button is
                  clicked=_context menus are displayed^=yes|context menus aren't
                  displayed^=no}; %SELECTION%=^?{(T=C)Content can be selected with the
                  mouse or keyboard=_content can be selected with the mouse or
                  keyboard^=yes|content can't be selected with the mouse or keyboard^=no};
                  %NAVIGABLE%=^?{(T=C)Linked documents will be loaded where=links in the
                  main HTA window will be loaded in the main HTA window^=yes|_links in the
                  main HTA window will be loaded in a new browser window^=no};
                  %BORDER%=^?{(T=C)Type of window
                  border=_unset^=^%EMPTY%|dialog|thick|_thin|none};
                  %BORDERSTYLE%=^?{(T=C)Style for the content border within the HTA
                  window=_normal border^=normal|raised 3-D border^=raised|sunken 3-D
                  border^=sunken|raised and sunken border^=complex|3-D border typically
                  used for windows that don't accept user input^=static};
                  %INNERBORDER%=^?{(T=C)Inner 3-D border is displayed=_3-D inner border is
                  displayed^=yes|3-D inner border isn't displayed^=no};
                  %SHOWINTASKBAR%=^?{(T=C)HTA is displayed in the Windows taskbar=_HTA is
                  displayed in the Windows taskbar^=yes|HTA isn't displayed in the Windows
                  taskbar^=no}; %SINGLEINSTANCE%=^?{(T=C)Only one instance of the
                  specified HTA can run at a time=only one instance of the specified HTA
                  can run at a time^=yes|_multiple instances of the specified HTA can run
                  at the same time^=no}; %WINDOWSTATE%=^?{(T=C)Initial size of the HTA
                  window=window doesn't display on launch; instead, the title of the
                  minimized application appears in the taskbar^=minimize|window is sized
                  to fill the screen^=maximize|_window size is not set^=^%EMPTY%}

                  ;check icon
                  ^!IfFileExist ^%ICON% :SKIP
                  ^!Set %ICON%=^%EMPTY%

                  ;check default values
                  ^!IfSame "^%BORDERSTYLE%" "normal" ^!Set %BORDERSTYLE%=^%EMPTY%
                  ^!IfSame "^%CAPTION%" "yes" ^!Set %CAPTION%=^%EMPTY%
                  ^!IfSame "^%CONTEXTMENU%" "yes" ^!Set %CONTEXTMENU%=^%EMPTY%
                  ^!IfSame "^%INNERBORDER%" "yes" ^!Set %INNERBORDER%=^%EMPTY%
                  ^!IfSame "^%MAXIMIZEBUTTON%" "yes" ^!Set %MAXIMIZEBUTTON%=^%EMPTY%
                  ^!IfSame "^%MINIMIZEBUTTON%" "yes" ^!Set %MINIMIZEBUTTON%=^%EMPTY%
                  ^!IfSame "^%NAVIGABLE%" "no" ^!Set %NAVIGABLE%=^%EMPTY%
                  ^!IfSame "^%SCROLL%" "yes" ^!Set %SCROLL%=^%EMPTY%
                  ^!IfSame "^%SCROLLFLAT%" "no" ^!Set %SCROLLFLAT%=^%EMPTY%
                  ^!IfSame "^%SELECTION%" "yes" ^!Set %SELECTION%=^%EMPTY%
                  ^!IfSame "^%SHOWINTASKBAR%" "yes" ^!Set %SHOWINTASKBAR%=^%EMPTY%
                  ^!IfSame "^%SINGLEINSTANCE%" "no" ^!Set %SINGLEINSTANCE%=^%EMPTY%
                  ^!IfSame "^%SYSMENU%" "yes" ^!Set %SYSMENU%=^%EMPTY%

                  ;insert values
                  ^!InsertWizardHtml <hta:application id="^%APPLICATIONNAME%"
                  applicationname="^%APPLICATIONNAME%" border="^%BORDER%"
                  borderstyle="^%BORDERSTYLE%" caption="^%CAPTION%"
                  contextmenu="^%CONTEXTMENU%" icon="^%ICON%" innerborder="^%INNERBORDER%"
                  maximizebutton="^%MAXIMIZEBUTTON%" minimizebutton="^%MINIMIZEBUTTON%"
                  navigable="^%NAVIGABLE%" scroll="^%SCROLL%" scrollflat="^%SCROLLFLAT%"
                  selection="^%SELECTION%" showintaskbar="^%SHOWINTASKBAR%"
                  singleinstance="^%SINGLEINSTANCE%" sysmenu="^%SYSMENU%"
                  windowstate="^%WINDOWSTATE%">

                  :END

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



                  [Non-text portions of this message have been removed]
                • Sheri
                  ... OK, in my case, there were a series of html documents with links among them, not bookmark anchors within the same document. ... You re welcome, glad I
                  Message 8 of 10 , Jul 8, 2009
                  View Source
                  • 0 Attachment
                    --- In ntb-clips@yahoogroups.com, "rogue_ronin" <swordplay@...> wrote:
                    >
                    > --- In ntb-clips@yahoogroups.com, "Sheri" <silvermoonwoman@> wrote:

                    >
                    > >
                    > > It looks like links, when they work at all, open a real browser
                    > > window.
                    >
                    > Actually, for my test file the intra-document links worked just
                    > fine -- I could bounce around inside the document at will. I
                    > expect that external links would open a browser -- but I won't be
                    > using them for eBooks.

                    OK, in my case, there were a series of html documents with links among them, not bookmark anchors within the same document.

                    >
                    > > If a script is inserted within the head section of a html
                    > > document it can resize and move the window to a fixed location.
                    > > The document doesn't have to be an .hta document or have hta
                    > > tags.
                    >
                    > That's actually what all the ^** fuss is about: I'd like to
                    > resize the window to roughly eBook display size. But I don't want
                    > to include the resizing code in the final product.
                    >
                    > Thank you, oh NoteTab Princess!
                    >
                    > :)
                    >

                    You're welcome, glad I could help. But if not for Lotta, I probably never would have heard of mshta either. :)

                    Regards,
                    Sheri
                  Your message has been successfully submitted and would be delivered to recipients shortly.