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

[Clip] Re: Get Path of Current Document?

Expand Messages
  • Sheri
    ... Renaming the document buffer does not create a file. However if the document has been previously saved, renaming the document also renames the file. The
    Message 1 of 11 , Jul 10 11:51 AM
      --- In ntb-clips@yahoogroups.com, Jeff <jeff@...> wrote:
      >
      > That is what I ran into, so I renamed the docs in my earlier
      > version and that allowed them to be saved under the clip's
      > function after the file name had been set. So they saved , even
      > though they had not been previously saved, just renamed. ( I am
      > assuming the rename process puts the doc as saved in some
      > temporary location?)

      Renaming the document buffer does not create a file. However if the document has been previously saved, renaming the document also renames the file. The text is probably usually just in memory until/unless saved. A temporary file gets created for an unsaved document buffer if you reference it as ^**, but such temporary files have names like efo~1.txt.

      Regards,
      Sheri
    • Jeff
      I knew about the EFO temporary names, I was just wondering why an unsaved doc can not be saved with the clip, (except ^!Save Asor if it is renamed first) .
      Message 2 of 11 , Jul 10 12:09 PM
        I knew about the EFO temporary names, I was just wondering why an
        unsaved doc can not be saved with the clip, (except ^!Save Asor if it is
        renamed first) . Just seems weird to my logic. I would expect it to
        pop-up a save-as box.

        Jeff

        Sheri wrote:
        >
        >
        > --- In ntb-clips@yahoogroups.com <mailto:ntb-clips%40yahoogroups.com>,
        > Jeff <jeff@...> wrote:
        > >
        > > That is what I ran into, so I renamed the docs in my earlier
        > > version and that allowed them to be saved under the clip's
        > > function after the file name had been set. So they saved , even
        > > though they had not been previously saved, just renamed. ( I am
        > > assuming the rename process puts the doc as saved in some
        > > temporary location?)
        >
        > Renaming the document buffer does not create a file. However if the
        > document has been previously saved, renaming the document also renames
        > the file. The text is probably usually just in memory until/unless
        > saved. A temporary file gets created for an unsaved document buffer if
        > you reference it as ^**, but such temporary files have names like
        > efo~1.txt.
        >
        > Regards,
        > Sheri
        >
        >
        > ------------------------------------------------------------------------
        >
        >
        > No virus found in this incoming message.
        > Checked by AVG - www.avg.com
        > Version: 8.5.387 / Virus Database: 270.13.9/2229 - Release Date: 07/10/09 07:05:00
        >
        >

        --


        Jeffery G. Scism, IBSSG
        Flockmaster,
        International Blacksheep Society of Genealogists

        http://ibssg.org/blacksheep/

        http://bsmeadow.blogspot.com/ Blacksheep's Meadow

        http://www.flickr.com/photos/7764576@N05/ Photostream
      • Sheri
        ... Make a wizard if you want a save dialog.
        Message 3 of 11 , Jul 10 12:18 PM
          --- In ntb-clips@yahoogroups.com, Jeff <jeff@...> wrote:
          >
          > I knew about the EFO temporary names, I was just wondering why an
          > unsaved doc can not be saved with the clip, (except ^!Save Asor
          > if it is renamed first) . Just seems weird to my logic. I would
          > expect it to pop-up a save-as box.

          Make a wizard if you want a save dialog.
        • ebbtidalflats
          Another two cents worth ... GetPath and GetDocName are two DIFFERENT kind of functions GetPath, like GetName, REQUIRES a filepath and name as argument. It does
          Message 4 of 11 , Jul 11 8:30 AM
            Another two cents worth

            --- In ntb-clips@yahoogroups.com, "Don - HtmlFixIt.com" <don@...> wrote:
            >
            > ^!Set %var%="^$GetPath$"
            > ^!Set %var2%="^$GetDocName$"
            > ^!Info [C]one: ^%var%
            > ^!Info [C]two: ^%var2%
            >
            >
            > GetPath doesn't work the same as GetDocName.
            >
            > I think it should,

            GetPath and GetDocName are two DIFFERENT kind of functions

            GetPath, like GetName, REQUIRES a filepath and name as argument. It does NOT work on the current document by default.

            Unlike GetDocName, which works ONLY on open documents.
            Without argument, it works on the active document. If you provide an argument, it needs to be the docindex on an open doc.



            > but nonetheless how do I get path for the current
            > document?
            >


            Path of the current doc is ^$GetPath(^**)$, which will also return the temporary (unsaved) doc path.


            If you use ^## you will goet the path of a saved document, or the last known path of a modified document, but a never-saved file will not have a path (but see above).

            Whew!


            Cheers,


            Eb
          • Don - HtmlFixIt.com
            I was trying to find all of the ^** type stuff in help the other day when I was working on this ... you cannot search help for those characters which was
            Message 5 of 11 , Jul 11 8:54 AM
              I was trying to find all of the ^** type stuff in help the other day
              when I was working on this ... you cannot search help for those
              characters which was causing me difficulty in finding them. I wondered
              if the below statement would do what I needed ... but I never remember
              ^** and ^## and what they are.

              > Path of the current doc is ^$GetPath(^**)$, which will also return the temporary (unsaved) doc path.
              >
              >
              > If you use ^## you will goet the path of a saved document, or the last known path of a modified document, but a never-saved file will not have a path (but see above).
              >
              > Whew!
              >
              >
              > Cheers,
              >
              >
              > Eb
            • Sheri
              ... They are in Clipcode Syntax, and any of the following finds them: doc file variable for the temporary versions, also: temp also: * # Regards, Sheri
              Message 6 of 11 , Jul 11 9:45 AM
                --- In ntb-clips@yahoogroups.com, "Don - HtmlFixIt.com" <don@...> wrote:
                >
                > I was trying to find all of the ^** type stuff in help the other
                > day when I was working on this ... you cannot search help for
                > those characters which was causing me difficulty in finding them.
                > I wondered if the below statement would do what I needed ... but
                > I never remember ^** and ^## and what they are.

                They are in Clipcode Syntax, and any of the following finds them:
                doc
                file
                variable

                for the temporary versions, also:
                temp

                also:
                *
                #

                Regards,
                Sheri
              • loro
                ... That s because you look in Clip Help, but they are in the ordinary Help file. Reference Information | Tools | Editor Clipbook | Clip Basics Lotta
                Message 7 of 11 , Jul 14 7:01 PM
                  Don wrote:
                  >I was trying to find all of the ^** type stuff in help the other day
                  >when I was working on this ... you cannot search help for those
                  >characters which was causing me difficulty in finding them. I wondered
                  >if the below statement would do what I needed ... but I never remember
                  >^** and ^## and what they are.

                  That's because you look in Clip Help, but they are in the ordinary Help file.
                  Reference Information | Tools | Editor Clipbook | Clip Basics

                  Lotta
                • loro
                  ... Or, since this is the Clip list... :-P ... h= %&#$!!! ^!hh.exe ^$GetAppPath$NoteTab.chm::/clip_basics.htm ... Lotta
                  Message 8 of 11 , Jul 14 7:34 PM
                    Lotta wrote:
                    >Don wrote:
                    > >I was trying to find all of the ^** type stuff in help the other day
                    > >when I was working on this ... you cannot search help for those
                    > >characters which was causing me difficulty in finding them. I wondered
                    > >if the below statement would do what I needed ... but I never remember
                    > >^** and ^## and what they are.
                    >
                    >That's because you look in Clip Help, but they are in the ordinary Help file.
                    >Reference Information | Tools | Editor Clipbook | Clip Basics

                    Or, since this is the Clip list... :-P

                    -------------------
                    h="%&#$!!!"
                    ^!hh.exe "^$GetAppPath$NoteTab.chm::/clip_basics.htm"
                    -------------------

                    Lotta
                  Your message has been successfully submitted and would be delivered to recipients shortly.