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

Re: [NTB] Command line to open outline heading

Expand Messages
  • loro
    ... Is it always the same OTL topics you want to open? The way I do it is a two step rocket and involves a clip and the clip must contain the filename of the
    Message 1 of 11 , Oct 8, 2009
      orkgandalf wrote:
      >I'm investigating the possibility to use a command line to open
      >Notetab std, one specific otl file, one specific heading -- all in
      >one unique command line.
      >So far I only learned how to open one specific file.
      >Let me know if you have ever seen someone trying to do this.

      Is it always the same OTL topics you want to open? The way I do it is
      a two step rocket and involves a clip and the clip must contain the
      filename of the OTL and the heading you want to focus, so no good if
      you want to do this on a whim, so to speak.

      I have a library called OpenDocs. In that I have a number of clips
      that go something like this.
      ------------------
      h="ReadMe.otl - mathematics"
      ^!Open ^$GetAppPath$ReadMe.otl
      ^!SetTopicIndex 8
      --------------------

      Then I run the clip from the command line.
      "C:\NoteTab Pro\NotePro.exe" /L="OpenDocs:ReadMe.otl - mathematics"

      Lotta
    • orkgandalf
      ... Thanks Lotta, you re right and almost resolved my problem. In fact, I think we re almost there. Yes, the heading to open is always the same. Is that i have
      Message 2 of 11 , Oct 9, 2009
        --- In notetab@yahoogroups.com, loro <tabbie@...> wrote:
        >
        > orkgandalf wrote:
        > >I'm investigating the possibility to use a command line to open
        > >Notetab std, one specific otl file, one specific heading -- all in
        > >one unique command line.
        > >So far I only learned how to open one specific file.
        > >Let me know if you have ever seen someone trying to do this.
        >
        > Is it always the same OTL topics you want to open? The way I do it is
        > a two step rocket and involves a clip and the clip must contain the
        > filename of the OTL and the heading you want to focus, so no good if
        > you want to do this on a whim, so to speak.
        >
        > I have a library called OpenDocs. In that I have a number of clips
        > that go something like this.
        > ------------------
        > h="ReadMe.otl - mathematics"
        > ^!Open ^$GetAppPath$ReadMe.otl
        > ^!SetTopicIndex 8
        > --------------------
        >
        > Then I run the clip from the command line.
        > "C:\NoteTab Pro\NotePro.exe" /L="OpenDocs:ReadMe.otl - mathematics"
        >
        > Lotta
        >

        Thanks Lotta, you're right and almost resolved my problem. In fact, I think we're almost there. Yes, the heading to open is always the same. Is that i have all my journal in one single otl file and, sometimes I need to quickly get to one of the headings thru my Executor, the launcher program I use. That helps me to remember where I want to go to.

        I did a couple of tests with your hint and thought I could get the index of the heading by using the ^$GetTopicIndex command. And it is almost working. It works for headings without spaces, ie, "20091010---" but the problem is that it's not working for headings with spaces like "[Hilux] Fuel".

        I tried the following commands but it positions the file in the very first heading. It's not going to the one I want.

        h="Hilux"
        ^!Open d:\00\documents\docs\notes\Journal.otl
        ^!SetTopicIndex ^$GetTopicIndex([Hilux] Fuel)$

        I also tried to put the heading name with double quotes, no success.

        ^!SetTopicIndex ^$GetTopicIndex("[Hilux] Fuel")$

        Let me know if you can see something wrong here.

        Cheers!

        Orks
      • loro
        ... That s odd. I added [Hilux] Fuel to an OTL and ^$GetTopicIndex([Hilux] Fuel)$ works fine. I tested in Pro, both 6 and 4.95, but I don t think there s a
        Message 3 of 11 , Oct 9, 2009
          orkgandalf wrote:
          >I did a couple of tests with your hint and thought I could get the
          >index of the heading by using the ^$GetTopicIndex command. And it is
          >almost working. It works for headings without spaces, ie,
          >"20091010---" but the problem is that it's not working for headings
          >with spaces like "[Hilux] Fuel".

          That's odd. I added "[Hilux] Fuel" to an OTL and
          ^$GetTopicIndex([Hilux] Fuel)$ works fine. I tested in Pro, both 6
          and 4.95, but I don't think there's a difference between Pro and
          Standard regarding this. Are you sure the heading is exactly like
          that? No leading or tailing space or anything?

          Lotta
        • Sheri
          ... How was the outline file created? Could the seeming space be anon-breaking space? Could the topic name have spaces or non-breaking spaces at the end?
          Message 4 of 11 , Oct 9, 2009
            --- In notetab@yahoogroups.com, "orkgandalf" <orkgandalf@...> wrote:
            >
            >
            >
            > --- In notetab@yahoogroups.com, loro <tabbie@> wrote:
            > >
            > > orkgandalf wrote:
            > > >I'm investigating the possibility to use a command line to open
            > > >Notetab std, one specific otl file, one specific heading -- all in
            > > >one unique command line.
            > > >So far I only learned how to open one specific file.
            > > >Let me know if you have ever seen someone trying to do this.
            > >
            > > Is it always the same OTL topics you want to open? The way I do it is
            > > a two step rocket and involves a clip and the clip must contain the
            > > filename of the OTL and the heading you want to focus, so no good if
            > > you want to do this on a whim, so to speak.
            > >
            > > I have a library called OpenDocs. In that I have a number of clips
            > > that go something like this.
            > > ------------------
            > > h="ReadMe.otl - mathematics"
            > > ^!Open ^$GetAppPath$ReadMe.otl
            > > ^!SetTopicIndex 8
            > > --------------------
            > >
            > > Then I run the clip from the command line.
            > > "C:\NoteTab Pro\NotePro.exe" /L="OpenDocs:ReadMe.otl - mathematics"
            > >
            > > Lotta
            > >
            >
            > Thanks Lotta, you're right and almost resolved my problem. In fact, I think we're almost there. Yes, the heading to open is always the same. Is that i have all my journal in one single otl file and, sometimes I need to quickly get to one of the headings thru my Executor, the launcher program I use. That helps me to remember where I want to go to.
            >
            > I did a couple of tests with your hint and thought I could get the index of the heading by using the ^$GetTopicIndex command. And it is almost working. It works for headings without spaces, ie, "20091010---" but the problem is that it's not working for headings with spaces like "[Hilux] Fuel".
            >
            > I tried the following commands but it positions the file in the very first heading. It's not going to the one I want.
            >
            > h="Hilux"
            > ^!Open d:\00\documents\docs\notes\Journal.otl
            > ^!SetTopicIndex ^$GetTopicIndex([Hilux] Fuel)$
            >
            > I also tried to put the heading name with double quotes, no success.
            >
            > ^!SetTopicIndex ^$GetTopicIndex("[Hilux] Fuel")$
            >
            > Let me know if you can see something wrong here.
            >
            > Cheers!
            >
            > Orks
            >

            How was the outline file created? Could the seeming space be anon-breaking space? Could the topic name have spaces or non-breaking spaces at the end?
          • orkgandalf
            Hummm, i checked it and couldn t find anything unusual with the name of the topic, no space at the end, only in the middle. I did more tests and i m kinda
            Message 5 of 11 , Oct 9, 2009
              Hummm, i checked it and couldn't find anything unusual with the name of the topic, no space at the end, only in the middle.
              I did more tests and i'm kinda intrigued. I created a new topic called "mosca" a plain simple word, changed the clip and it is not finding it as well. I tried some others topic names with and without spaces, some it finds and some it does not.
              I may be missing something in here.
              Orks
            • orkgandalf
              Hummm, i checked it and couldn t find anything unusual with the name of the topic, no space at the end, only in the middle. I did more tests and i m kinda
              Message 6 of 11 , Oct 9, 2009
                Hummm, i checked it and couldn't find anything unusual with the name of the topic, no space at the end, only in the middle.
                I did more tests and i'm kinda intrigued. I created a new topic called "mosca" a plain simple word, changed the clip and it is not finding it as well. I tried some others topic names with and without spaces, some it finds and some it does not.
                I may be missing something in here.
                Orks
              • loro
                ... I wonder if it could it be a timing issue. Maybe the clip tries to find the heading before the OTL is fully opened. Add a ^!Delay 010, or what you find to
                Message 7 of 11 , Oct 9, 2009
                  orkgandalf wrote:
                  >Hummm, i checked it and couldn't find anything unusual with the name
                  >of the topic, no space at the end, only in the middle.
                  >I did more tests and i'm kinda intrigued. I created a new topic
                  >called "mosca" a plain simple word, changed the clip and it is not
                  >finding it as well. I tried some others topic names with and without
                  >spaces, some it finds and some it does not.
                  >I may be missing something in here.

                  I wonder if it could it be a timing issue. Maybe the clip tries to
                  find the heading before the OTL is fully opened. Add a ^!Delay 010,
                  or what you find to be an appropriate amount of time, after the
                  ^!Open command and see if that makes a difference. Also, did you
                  check if the ^$GetTopicIndex([Hilux] Fuel)$ works on an already open OTL?

                  Lotta
                • orkgandalf
                  ... Yes, I m sure it has not leading or trailing blanks. Just tested it again, no success. This is how my clip looks like. Do you see anything wrong here?
                  Message 8 of 11 , Oct 9, 2009
                    --- In notetab@yahoogroups.com, loro <tabbie@...> wrote:
                    >
                    > orkgandalf wrote:
                    > >I did a couple of tests with your hint and thought I could get the
                    > >index of the heading by using the ^$GetTopicIndex command. And it is
                    > >almost working. It works for headings without spaces, ie,
                    > >"20091010---" but the problem is that it's not working for headings
                    > >with spaces like "[Hilux] Fuel".
                    >
                    > That's odd. I added "[Hilux] Fuel" to an OTL and
                    > ^$GetTopicIndex([Hilux] Fuel)$ works fine. I tested in Pro, both 6
                    > and 4.95, but I don't think there's a difference between Pro and
                    > Standard regarding this. Are you sure the heading is exactly like
                    > that? No leading or tailing space or anything?
                    >
                    > Lotta
                    >

                    Yes, I'm sure it has not leading or trailing blanks.
                    Just tested it again, no success.
                    This is how my clip looks like. Do you see anything wrong here?
                    http://is.gd/47Ekq
                  • loro
                    ... You could also try the below with the OTL in question focused. ^!Info ^$GetTopicIndex([Hilux] Fuel)$ If the heading can t be found it should return 0 . I
                    Message 9 of 11 , Oct 9, 2009
                      I wrote:
                      >orkgandalf wrote:
                      > >Hummm, i checked it and couldn't find anything unusual with the name
                      > >of the topic, no space at the end, only in the middle.
                      > >I did more tests and i'm kinda intrigued. I created a new topic
                      > >called "mosca" a plain simple word, changed the clip and it is not
                      > >finding it as well. I tried some others topic names with and without
                      > >spaces, some it finds and some it does not.
                      > >I may be missing something in here.
                      >
                      >I wonder if it could it be a timing issue. Maybe the clip tries to
                      >find the heading before the OTL is fully opened. Add a ^!Delay 010,
                      >or what you find to be an appropriate amount of time, after the
                      >^!Open command and see if that makes a difference. Also, did you
                      >check if the ^$GetTopicIndex([Hilux] Fuel)$ works on an already open OTL?

                      You could also try the below with the OTL in question focused.

                      ^!Info ^$GetTopicIndex([Hilux] Fuel)$

                      If the heading can't be found it should return "0".

                      I just realized we are on the wrong list. Maybe we should move this
                      to the clip list if it drags on.

                      Lotta
                    • loro
                      ... Did you try this? I m curious. Lotta
                      Message 10 of 11 , Oct 15, 2009
                        Lotta wrote:
                        >I wonder if it could it be a timing issue. Maybe the clip tries to
                        >find the heading before the OTL is fully opened. Add a ^!Delay 010,
                        >or what you find to be an appropriate amount of time, after the
                        >^!Open command and see if that makes a difference. Also, did you
                        >check if the ^$GetTopicIndex([Hilux] Fuel)$ works on an already open OTL?

                        Did you try this? I'm curious.

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