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

Re: [Clip] Hyperlinks to run programs

Expand Messages
  • Alan C.
    On Fri, 05 Nov 2004 00:41:22 -0000, Jelks Cabaniss wrote: [  a hyperlinked command line to open a file gets rather lengthy in an NTB outline doc ] ... [ . . ]
    Message 1 of 15 , Nov 5, 2004
    • 0 Attachment
      On Fri, 05 Nov 2004 00:41:22 -0000, Jelks Cabaniss wrote:

      [  a hyperlinked command line to open a file gets rather lengthy in an NTB outline doc ]

      > ["C:\Program Files\Microsoft Office\Office10
      > \excel.exe" "D:\MyDocs\foo\bar.xls"]
      >
      > Whew! There's got to be a better way.
      [ . . ]
      > But can an *already* "START-aware" program like Excel, etc. be
      > invoked through a hyperlink *directly* from within NoteTab Pro
      > without having to resort to these "workarounds"?

      START is a windows/dos INTERNAL command. (I'm not sure, but since i think your path inside the hyperlink does not need, does not use CMD.exe which means I think your above example is an EXTERNAL command).

      internal commands make use of the command interpreter (CMD.exe or command.com. IOW, enter a command and the interpreter interprets meaning and then executes according to the specifics of what had been entered.

      It appears that commands that need to be interpreted via CMD.exe are not a part of what NTB hyperlink does. But, executing a path to an app and a file (a.k.a. a command line but one that is without an explicit internal or interpreted command in it) (an EXTERNAL command?) IS acomplished, obviously.

      Best I could come up with so far follows:

      a one liner clip in the current active library:

      H="ixplor"
      D:\PROGRA~1\INTERN~1\IEXPLORE.EXE
      ;--clip ends on previous line--

      and, hyperlink:

      [ixplor C:\files\docs\testdoc.htm]

      click cursor on the ixplor then strike the F2 key expands the pertinent text. Then, ctrl key + double click the hyperlink.

      It works, opens specified file in Internet Explorer. But, you decide whether it worthwhile or not as it then either needs two undos and/or close the outline file without saving the changes.

      --
      Alan.
    • jxz
      Working on the principle that you don t need to specify a path for (1) programs in c: windows (2) Microsoft s own software, I created a shortcut in c: windows
      Message 2 of 15 , Nov 7, 2004
      • 0 Attachment
        Working on the principle that you don't need to specify a
        path for (1) programs in c:\windows (2) Microsoft's own
        software, I created a shortcut in c:\windows to a program
        called 2xExplorer.exe (located in C:\Programs\2xExplorer).
        I called the shortcut 2xe and windows added the usual .lnk
        extension of its own.

        The following line in a ntb document then enabled launching
        2xExplorer:

        [c:\windows\2xe.lnk]

        It's not what you want but it's a step ..
        John


        Jelks Cabaniss wrote:
        >
        > I posted the query below to the regular Notetab list, but it may
        > have been a little beyond that audience. Some of you clip gurus
        > here might have run into this before...
        >
        > One of the great things about NoteTab are links in plain .txt
        > documents, like [this] -- double-clicking the word "this" in those
        > brackets opens "this.txt".
        >
        > But it can also run programs -- *without* having to use clips! For
        > example:
        >
        > [notepad.exe]
        > [notepad.exe d:\MyDocs\foo.txt]
        >
        > This works because notepad.exe is in the path -- you can just as
        > easily run Notepad.exe in a command prompt without prefixing its
        > path location.
        >
        > But this:
        >
        > [excel.exe]
        >
        > does NOT work, nor does typing "excel.exe" at a command prompt,
        > because Excel is not in my %PATH%. Same with, for
        > example, "iexplore.exe".
        >
        > However, typing "start excel" (or "start iexplore") at the command
        > prompt DOES work! Why? What does XP's "start" know that the
        > ordinary command processor doesn't? (Note that the Windows
        > GUI's "Start button -> Run" apparently works similarly.)
        >
        > Here's my question: how can I run Excel, Winword, IE, etc. within a
        > hyperlink to work like the START command? I've got a working link
        > that reads something like (pardon the line wrapping) ...
        >
        > ["C:\Program Files\Microsoft Office\Office10
        > \excel.exe" "D:\MyDocs\foo\bar.xls"]
        >
        > Whew! There's got to be a better way.
        >
        > Now of course there are "workarounds" -- I could create batch files
        > for each and every one of these programs and put them in the path, I
        > could extend the %PATH%, etc., etc.
        >
        > But can an *already* "START-aware" program like Excel, etc. be
        > invoked through a hyperlink *directly* from within NoteTab Pro
        > without having to resort to these "workarounds"?
        >
        > Thanks,
        >
        > /Jelks
        >
        >
        >
        > Yahoo! Groups Links
        >
        >
        >
        >
      • Jelks Cabaniss
        ... Yes, shortcuts (.lnk files) are another way, similar to the batch file method I finally ended up with (see below, which I had just composed before
        Message 3 of 15 , Nov 7, 2004
        • 0 Attachment
          jxz <jxz@o...> wrote:
          > [c:\windows\2xe.lnk]

          Yes, shortcuts (.lnk files) are another way, similar to the batch
          file method I finally ended up with (see below, which I had just
          composed before receiving this message of yours) ...


          Jody & Alan: Yes, there are no doubt dozens (if not hundreds) of
          ways you can achieve the objective with clips. What intrigued me,
          though, was the power of Notetab hyperlinking -- not just in Outline
          documents, but in normal Text documents.

          It works great if you want to open up any human-readable document
          (.txt, .html, .xml, etc.) -- the file just opens in Notetab. But if
          your link is to a binary data file (like [SomeFile.xls] is an Excel
          spreadsheet), Notetab opens the binary in its editor, which is not
          exactly what one wants.

          I got curious as to how one might use Notetab's hyperlinking INSTEAD
          of clips to launch the program associated with the filename's
          extension. This also led me to discover something I had not known
          previously (and still haven't quite gotten the skinny on) -- that
          the START command knows about programs that aren't in the PATH --
          you can NOT type "excel" at a command prompt; you CAN type "start
          excel". You can also type "start SomeFile.xls" ...

          Anyway, I found several ways of achieving this without clips and
          just using a hyperlink. Here are a few, from the most painful to
          the simplest:

          The full, direct (and verbose!) way -- watch for email wrap:

          ["C:\Program Files\Microsoft Office\Office10
          \excel.exe" "D:\MyDocs\Autos\E320 wagons.xls"]

          Using the START command:

          [cmd.exe /c start excel "" "D:\MyDocs\Autos\E320 wagons.xls"]
          [cmd.exe /c start "D:\MyDocs\Autos\E320 wagons.xls"]

          Note in the above, you can only invoke START via the command
          processor (I suppose if you're using Win9x, you'd probably have to
          use "command.com /c" instead of "cmd.exe"). IMO, I think that's way
          too verbose too.

          I guess the simplest means of running the associated program is
          twofold: 1) Add the directory or directories of the executable[s]
          to your system's PATH, or 2) create a batch file and put it in your
          path. I chose the latter (I like to keep my PATH as short as
          possible)). Here's my "excel.bat":

          @start "" "C:\Program Files\Microsoft Office\Office10\excel.exe" %1

          Now in Notetab, I can have a link like

          [excel.bat "D:\MyDocs\Autos\E320 wagons.xls"]

          somewhere in a .TXT file, double-click on it from within Notetab,
          and Excel launches with the specified spreadsheet.

          PS. I'd *still* like to know the secret of the START command's
          expanded PATH environment. How does it "know" where Excel (and
          Internet Explorer) is, when Excel (and IE) isn't in the PATH? :)

          /Jelks
        • Jelks Cabaniss
          ... I found it! See: http://www.winnetmag.com/Article/ArticleID/14908/14908.html The short answer is that anything (like Excel.exe, etc.) that s in the
          Message 4 of 15 , Nov 7, 2004
          • 0 Attachment
            I wrote:

            > I'd *still* like to know the secret of the START command's
            > expanded PATH environment. How does it "know" where Excel (and
            > Internet Explorer) is, when Excel (and IE) isn't in the PATH? :)

            I found it! See:

            http://www.winnetmag.com/Article/ArticleID/14908/14908.html

            The short answer is that anything (like Excel.exe, etc.) that's in
            the

            HKLM\Microsoft\Windows\CurrentVersion\App Paths

            registry hive is part of that expanded path that both the START
            command and Start Menu -> Run knows about. The programs listed
            there are aliases to the real programs' locations.

            That doesn't really help the Notetab hyperlinking issue much, since
            invoking START means making the link look something like ...

            [cmd.exe /c start SomeFile.xls]

            ... and that's a bit of a mouthful; [excel.bat SomeFile.xls] is a
            bit better, IMO. :)

            It would really be neat if there were a way to tell Notetab
            (internally in the preferences, not via a clip): "When I double-
            click a .XLS file in a link, lauch Excel". That way, a plain old
            [SomeFile.xls] would work. Something like the Preferences dialog
            where you can add *ML extensions for NTP's color coding, except in
            this case you would add extensions and the programs to be launched
            when encountering in links. (.xls -> ...excel.exe, .doc -
            > ...winword.exe). Only useful for *binary* file formats, of course.

            And yes, I know, you can always write clips. :)

            /Jelks
          • Jody
            Hi Jelks, ... ;) ... That would be nice. Actually, I think Eric should just make NoteTab look up the file type in the registry and open it with whatever it is
            Message 5 of 15 , Nov 7, 2004
            • 0 Attachment
              Hi Jelks,

              >... and that's a bit of a mouthful; [excel.bat SomeFile.xls] is a
              >bit better, IMO. :)

              ;)

              >It would really be neat if there were a way to tell Notetab
              >(internally in the preferences, not via a clip): "When I double-
              >click a .XLS file in a link, lauch Excel". That way, a plain old
              >[SomeFile.xls] would work. Something like the Preferences dialog
              >where you can add *ML extensions for NTP's color coding, except in
              >this case you would add extensions and the programs to be launched
              >when encountering in links. (.xls -> ...excel.exe, .doc -
              >> ...winword.exe). Only useful for *binary* file formats, of course.

              That would be nice. Actually, I think Eric should just make NoteTab
              look up the file type in the registry and open it with whatever it
              is associated with.

              >And yes, I know, you can always write clips. :)

              Yes, but I was just trying to give you a way to [c:\path\file.xls] ;)

              bcnu,
              jody

              I can only please one person a day.
              Today is obviously not your day.
              Tomorrow doesn't look good either. 8D
              http://www.clean-funnies.com
              http://www.fookes.com/regnow.html?2448 ;)
              http://www.sojourner.us/software
            • Hugo Paulissen
              Jelks, (and others,) You can try this... [file://C: Documents and Settings h.paulissen Desktop lijstfdcw1-10- 04.xls] [file://C: Documents and
              Message 6 of 15 , Nov 8, 2004
              • 0 Attachment
                Jelks, (and others,)

                You can try this...

                [file://C:\Documents and Settings\h.paulissen\Desktop\lijstfdcw1-10-
                04.xls]

                [file://C:\Documents and Settings\h.paulissen\My Documents\My
                Pictures\bl6.jpg]

                Doesn't look too good, but it works, at least for me... I'm not sure,
                but I think it depends on how your browser handles rhe URL
                file://etc.*

                Hugo
              • Jelks Cabaniss
                ... Interesting -- that actually works! Browser prompts for Open or Save , but that s OK (you can uncheck the Always ask ... box). Notetab underlines in
                Message 7 of 15 , Nov 8, 2004
                • 0 Attachment
                  Hugo Paulissen wrote:

                  > [file://C:\Documents and Settings\h.paulissen\Desktop\
                  > lijstfdcw1-10-04.xls]

                  Interesting -- that actually works! Browser prompts for "Open or
                  Save", but that's OK (you can uncheck the "Always ask ..." box).

                  Notetab underlines in blue everything before the first space in the
                  file: URL, but that's just a color-coding issue. It still treats
                  the entire string between the brackets correctly. (Out of
                  curiosity, I tried escaping the spaces with %20, making it a true
                  URL, but it didn't "work". That may be a browser issue though --
                  only tried with Avantbrowser, an IE shell.)

                  Thanks, Hugo!

                  BTW, anyone know how to pull up an Outlook Contact using Notetab
                  hyperlinks? This:

                  [outlook://Contacts]

                  *does* open Outlook and puts you in the Contacts folder, but I
                  haven't found a way to actually address a contact.

                  /Jelks
                • Jody
                  Hi Jelks, ... [ ] Add the and the file type of the file you have it in to HTML
                  Message 8 of 15 , Nov 8, 2004
                  • 0 Attachment
                    Hi Jelks,

                    >Interesting -- that actually works! Browser prompts for "Open or
                    >Save", but that's OK (you can uncheck the "Always ask ..." box).
                    >
                    >Notetab underlines in blue everything before the first space in the
                    >file: URL, but that's just a color-coding issue.

                    [<file://C:\Documents and Settings\h.paulissen\Desktop\lijstfdcw1-10-04.xls>]

                    Add the <> and the file type of the file you have it in to HTML
                    Files in Options. HTML Files open when the Edit item in the
                    Windows Explorer content menu is invoked, so it shouldn't
                    interfere with anything else. I have txt, ja, and others in there
                    as well so I can <highlight this!> in my text based file types.

                    bcnu,
                    jody

                    I can only please one person a day.
                    Today is obviously not your day.
                    Tomorrow doesn't look good either. 8D
                    http://www.clean-funnies.com
                    http://www.fookes.com/regnow.html?2448 ;)
                    http://www.sojourner.us/software
                  • Jelks Cabaniss
                    ... 10-04.xls ] ... Jody, doesn t work here. Adding around the URL inside the brackets makes Notetab pass it to the browser as part of the the link
                    Message 9 of 15 , Nov 8, 2004
                    • 0 Attachment
                      Jody wrote:
                      > [<file://C:\Documents and Settings\h.paulissen\Desktop\lijstfdcw1-
                      10-04.xls>]
                      >
                      > Add the <> and the file type of the file you have it in to HTML
                      > Files in Options. HTML Files open when the Edit item in the
                      > Windows Explorer content menu is invoked, so it shouldn't
                      > interfere with anything else. I have txt, ja, and others in there
                      > as well so I can <highlight this!> in my text based file types.

                      Jody, doesn't work here. Adding < and > around the URL inside the
                      brackets makes Notetab pass it to the browser as part of the the
                      link name itself, at least when it comes to .XLS (Excel) files.
                      Adding a "file:" protocol to the path & file name passes it to my
                      default browser, which doesn't like "<file://foo.xls>" (note
                      brackets) in its address box.

                      Angle-bracketed links *do* work on NON-"file:" links, but that's
                      because the linked files are being opened in Notetab, not some other
                      program like Excel.

                      I also don't understand -- why would you want to add Excel binary
                      file types to Notetab's list of "HTML files"? I did try it to see
                      if it would make the angle-bracketed linking you describe work
                      with "file:" links (it didn't), but I removed it because it doesn't
                      really make sense to me to view color coded binary Excel files
                      inside Notetab.

                      /Jelks
                    • Jody
                      Hi Jelks, ... Put the arrows outside the brackets, sorry.
                      Message 10 of 15 , Nov 8, 2004
                      • 0 Attachment
                        Hi Jelks,

                        >> Add the <> and the file type of the file you have it in to HTML
                        >> Files in Options. HTML Files open when the Edit item in the
                        >> Windows Explorer content menu is invoked, so it shouldn't
                        >> interfere with anything else. I have txt, ja, and others in there
                        >> as well so I can <highlight this!> in my text based file types.
                        >
                        >Jody, doesn't work here. Adding < and > around the URL inside the
                        >brackets makes Notetab pass it to the browser as part of the the
                        >link name itself, at least when it comes to .XLS (Excel) files.

                        Put the arrows outside the brackets, sorry.
                        <[file://C:\Documents and Settings\h.paulissen\Desktop\lijstfdcw1-10-04.xls]

                        >I also don't understand -- why would you want to add Excel binary
                        >file types to Notetab's list of "HTML files"? I did try it to see
                        >if it would make the angle-bracketed linking you describe work
                        >with "file:" links (it didn't), but I removed it because it doesn't
                        >really make sense to me to view color coded binary Excel files
                        >inside Notetab.

                        You missed what I said to do. ;) No, you do not want to add xls
                        the the HTML Files list. You want to add the file type that you
                        have the <[...]> in, not the file you are trying to open. Adding
                        them to the HTML files list only haves that file type open in
                        NoteTab when *Edit* is used. You do not want to add a file type
                        that you edit with something else. It's just a trick to <get this
                        highlighted>.

                        Happy Clip'n!
                        Jody

                        www.clean-funnies.com, http://www.fookes.us/maillist.htm

                        Subscribe: mailto:ntb-Clips-Subscribe@yahoogroups.com
                        UnSubscribe: mailto:ntb-Clips-UnSubscribe@yahoogroups.com
                        Options: http://groups.yahoo.com/group/ntb-clips
                      • Jelks Cabaniss
                        ... Ah, I see what you re saying. Do you list .txt as an HTML file for this? /Jelks
                        Message 11 of 15 , Nov 8, 2004
                        • 0 Attachment
                          Jody wrote:
                          > You missed what I said to do. ;) No, you do not want to add xls
                          > the the HTML Files list. You want to add the file type that you
                          > have the <[...]> in, not the file you are trying to open. Adding
                          > them to the HTML files list only haves that file type open in
                          > NoteTab when *Edit* is used. You do not want to add a file type
                          > that you edit with something else. It's just a trick to <get this
                          > highlighted>.

                          Ah, I see what you're saying.

                          Do you list .txt as an "HTML file" for this?


                          /Jelks
                        • Jody
                          Hi Jelks, ... txt, ja, htm, html, shtml, js, pl, css, and others I want to open in NoteTab when I click on Edit from the Content (right click) menu in Windows
                          Message 12 of 15 , Nov 8, 2004
                          • 0 Attachment
                            Hi Jelks,

                            >> You missed what I said to do. ;) No, you do not want to add xls
                            >> the the HTML Files list. You want to add the file type that you
                            >> have the <[...]> in, not the file you are trying to open. Adding
                            >> them to the HTML files list only haves that file type open in
                            >> NoteTab when *Edit* is used. You do not want to add a file type
                            >> that you edit with something else. It's just a trick to <get this
                            >> highlighted>.
                            >
                            >Ah, I see what you're saying.
                            >
                            >Do you list .txt as an "HTML file" for this?

                            txt, ja, htm, html, shtml, js, pl, css, and others I want to open
                            in NoteTab when I click on Edit from the Content (right click)
                            menu in Windows Explorer (or My Computer). :) I also have Open
                            with NoteTab Pro on my main content menu and any file I right
                            click on I can open in NoteTab Pro. :)

                            ja = Jody Adair = Joseph Adair. ( Joseph Wayne Adair III :)

                            Happy Clip'n!
                            Jody

                            www.clean-funnies.com, http://www.fookes.us/maillist.htm

                            Subscribe: mailto:ntb-Clips-Subscribe@yahoogroups.com
                            UnSubscribe: mailto:ntb-Clips-UnSubscribe@yahoogroups.com
                            Options: http://groups.yahoo.com/group/ntb-clips
                          Your message has been successfully submitted and would be delivered to recipients shortly.