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

NTP Command Line - WAS - Re: [Clip] Running a NTP clip from within a DOS line command

Expand Messages
  • Larry Hamilton
    Patrick-Julien , Sherri, Alan, et. al., Here is a clip I built to create command lines that can use alternate ini files, and other options. I then use the
    Message 1 of 5 , Jul 29, 2002
      Patrick-Julien , Sherri, Alan, et. al.,

      Here is a clip I built to create command lines that can use alternate ini
      files, and other options. I then use the command lines to make shortcuts for
      the most common start-up's for NoteTab I want. It also works for on-the-fly
      launching of NoteTab. You can use NoteTab Pro to create a commandline for
      NoteTab Standard, and vice versa. You must create a new ini file for this
      clip to "see" and ini file to use. As always, one could easily modify the
      clip to copy a base ini file and rename it as needed.

      I have a lot of notes in this clip, since there is the tricky "_" beginning
      a file name. I recall this being discussed a few weeks ago.

      I have not updated this for a long time, I think there may be some new
      command line options to add. Hmmm.... I guess I better look into this. I
      always manage to find something to do... <g>.

      ______[Copy below this line]_______
      H="NoteTab CommandLine"
      ;04/29/2000
      ;Revised 07/23/2000
      ;Larry Hamilton lmh@...
      ^!SetListDelimiter=|
      ^!Set %path%=^$GetAppPath$
      ^!Set %pgm%=^?{NoteTab Version?==Standard^=NoteTab.exe|_Pro^=NotePro.exe}

      ;
      ;----------------------[begin long line]---------------------------
      ;Borrowed the _FillLibraryList clip and part of the SwitchLibrary clip from
      the Utilities.clb. Thanks to Eric for pointing out why this method is
      needed. Any Libraries that start with an "_" (underscore) need to have a
      space added in from of them, since the "_" has a special meaning in clip
      wizards. A major case of "if it was a snake it would have bit me." Thanks to
      Eric & Jody for their patience!
      ;-----------------------[end long line]----------------------------
      ;
      ;^!Clip FillLibraryList
      ^!FarClip Utilities:FillLibraryList
      ^!Set %LibraryName%=^?{(H=10)Choose a library==_^%LibraryList%}
      ^!Set %lib%=^$StrDelete("^%LibraryName%";1;1)$

      ;
      ;----------------------[begin long line]---------------------------
      ;**_CAUTION_**: Be careful with the use of the NoteTab.ini file. I trashed
      one and had to restore from backup. Be sure your ini files are backed up
      unless you do not mind re-creating all of your NoteTab settings, if there is
      a problem. ;)
      ;-----------------------[end long line]----------------------------
      ;
      ;
      ;----------------------[begin long line]---------------------------
      ^!Set
      %ini%=^$StrReplace("^$GetAppPath$";;"^$GetFiles("^$GetAppPath$";"*.ini")$";F
      alse;False)$
      ;-----------------------[end long line]----------------------------
      ;
      ^!Set %ini%=^?{(H=15)Choose ini to Open==^%ini%}
      ^!Set %ini%=^$StrReplace(".ini";;"^%ini%";False;False)$
      ;
      ;----------------------[begin long line]---------------------------
      ;Generates an Instance of NoteTab. Use needs to configure for their
      preferences.
      ;-----------------------[end long line]----------------------------
      ;
      ^!Set %inst%=^?{Instance?=="HTML Editing"|"Java"|Default^=""}
      ;
      ;----------------------[begin long line]---------------------------
      ;Since the ClipBar *.ctb files are in the Library directory, the
      ^$GetLibraryPath$ function can do double duty.
      ;-----------------------[end long line]----------------------------
      ;
      ;
      ;----------------------[begin long line]---------------------------
      ^!Set
      %bar%=^$StrReplace("^$GetLibraryPath$";;"^$GetFiles("^$GetLibraryPath$";"*.c
      tb")$";False;False)$
      ;-----------------------[end long line]----------------------------
      ;
      ^!Set %bar%=^?{(H=15)Choose ClipBar to Open==^%bar%}
      ^!Set %bar%=^$StrReplace(".ctb";;"^%bar%";False;False)$

      ;
      ;----------------------[begin long line]---------------------------
      ;Show the NoteTab Commandline that is created. This can then be copied and
      used to create a clip to launch different configurations of NoteTab.
      ;-----------------------[end long line]----------------------------
      ;
      ;
      ;----------------------[begin long line]---------------------------
      ;If you want to create a commandline that will launch a specific clip in the
      selected library, put a colon and the clip name after it like
      "/L=LibraryName:ClipName" I find this handy for running a specialized clip
      that needs to close all open documents. I tend to leave all of the documents
      I am currently working on open, so when I open NoteTab, I know what I was in
      the middle of. Yes, I know about favorites, but NoteTab lets me "do it my
      way." ;)
      ;-----------------------[end long line]----------------------------
      ;
      ^!Info "^%path%^%pgm%"/L="^%lib%" /C=^%bar% /INST="^%inst%" /INI="^%ini%"
      ^!Delay 15
      ;
      ;----------------------[begin long line]---------------------------
      ^!AppendToFile "D:\NoteTab\Documents\NoteTabCommandLines.txt"
      "^%path%^%pgm%"/L="^%lib%" /C=^%bar% /INST="^%inst%" /INI="^%ini%"
      ;-----------------------[end long line]----------------------------
      ;
      ^!Open "D:\NoteTab\Documents\NoteTabCommandLines.txt"

      ^!Run "^%path%^%pgm%" /L="^%lib%" /C=^%bar% /INST="^%inst%" /INI="^%ini%"
      _____[Copy above this line]______
      | right click over the clipbook |
      | and choose "Add from Clipboard" |
      ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
      Larry Hamilton
      lmh@...
      http://notlimah.tripod.com/
      http://jillhamilton-momteam.shorturl.com/
    • silvermoonwoman2001
      ... alternate ini ... Thanks Larry, that is a cool clip. Nice for setting up alternate environments. Too bad the autoload of documents is not available with
      Message 2 of 5 , Jul 30, 2002
        --- In ntb-clips@y..., "Larry Hamilton" <lmh@h...> wrote:
        > Patrick-Julien , Sherri, Alan, et. al.,
        >
        > Here is a clip I built to create command lines that can use
        alternate ini
        > files, and other options.

        Thanks Larry, that is a cool clip. Nice for setting up alternate
        environments. Too bad the autoload of documents is not available
        with these alternate instances.

        Regards,
        Sheri
      • Alan C.
        Hi Sheri, Thanks for the help! You ve been having some very good helpful insights, tips, pointers, assistance, etc. This here message/post is to clarify for
        Message 3 of 5 , Jul 30, 2002
          Hi Sheri,

          Thanks for the help! You've been having some very good helpful insights, tips, pointers, assistance, etc.

          This here message/post is to clarify for myself that evidently there are differences that exist between the term *alternate instance* and the term *2nd or alternate ini*

          >> Here is a clip I built to create command lines that can use
          >alternate ini
          >> files, and other options.
          >
          >Thanks Larry, that is a cool clip. Nice for setting up alternate
          >environments. Too bad the autoload of documents is not available
          >with these alternate instances.

          Yes. Help affirms no autoload using *alternate instance*.

          But, "*so as to clarify for myself*", a *2nd or alternate ini* the autoload does work. I've used a 2nd ini for the purpose of an organizer/catch all of sorts. I always left about 15 or 20 files/docs open in it and they reopened/loaded every time.

          My first NoteTab I kept uncluttered and I worked in it. My (2nd ntb) second ini I named it cluttr.ini just because I used it as my catch all (cluttered) 15 or 20 docs always open.

          Cheers to the junk collector aspect/element of myself!

          But yes, apparently what you spoke of, is that when use the *2nd instance commandline feature* is where help reports no autoload of documents.

          Regards. Alan.
        • silvermoonwoman2001
          ... autoload does work. I ve used a 2nd ini for the purpose of an organizer/catch all of sorts. I always left about 15 or 20 files/docs open in it and they
          Message 4 of 5 , Jul 30, 2002
            --- In ntb-clips@y..., "Alan C." <acumming@c...> wrote:


            > But, "*so as to clarify for myself*", a *2nd or alternate ini* the
            autoload does work. I've used a 2nd ini for the purpose of an
            organizer/catch all of sorts. I always left about 15 or 20
            files/docs open in it and they reopened/loaded every time.
            >
            > My first NoteTab I kept uncluttered and I worked in it. My (2nd
            ntb) second ini I named it cluttr.ini just because I used it as my
            catch all (cluttered) 15 or 20 docs always open.
            >
            > Cheers to the junk collector aspect/element of myself!
            >

            Hi Alan,

            Thank *you* for the tip.

            By triggering one these ini spec'ed command lines while NTP is
            already running, what happens to the autoloads in both inis? (my
            multiple instance setting is off)

            I'll have to fool around with this. Since I lost my autoload list
            the other day, I've been a bit lost with all my "junk" (I know I
            should have made backups <g>)

            Regards,
            Sheri
          • Alan C.
            Hi Sheri, ... I ve not ever used or tried the 2nd instance or whatever it s called command line option. But, as what the entirety of the following is all
            Message 5 of 5 , Jul 30, 2002
              Hi Sheri,

              >By triggering one these ini spec'ed command lines while NTP is
              >already running, what happens to the autoloads in both inis? (my
              >multiple instance setting is off)

              I've not ever used or tried the "2nd instance" or whatever it's called command line option. But, as what the entirety of the following is all about, I've had no problems at all while using the alternate ini feature.

              I've ran several NoteTabs simultaneously without a problem. A bit weird at first. But it definitely can be useful. It's an easy way to keep things separate as well as (somewhat) organized. Unless it just creates more room for junk.

              My multiple instance is off too. I've never had it on. So, everything stated herein is applicable when multiple instance is off.

              Any and all settings stored in one ini are unaffected by what happens with the other ini.

              Each unique ini or even if there's only one ini, the NoteTab settings (whatever you have your current session settings set at) are (saved) written to disk upon the closing of a NoteTab.

              Each ini is a separate entity. One ini, one entity. Two ini's, two entities. 3 ini's, 3 entities. Any Ntab opened with a specified ini is totally independent of another Ntab which was opened using a different ini.

              Each ini can have different (or can have the same) autoloads.

              Basically, from what I know of it, the ini is the configuration file its job is that it specifies in particular how is it that the NotePro.exe (the NoteTab application) is to be configured upon launch of the NotePro.exe using whichever specified ini. If no ini is specified, it defaults to notepro.ini

              An easy way to begin using a 2nd ini is to not even bother to create another ini. Instead, just run one of the following and it will create a brand new ini while opening a NoteTab and will assign your given/specified name to the ini.

              As per your specific name for the ini, if it does not already exist then a brand new as per your assigned name ini will be created.

              For instance, all my following will launch a NoteTab *and* create a brand new ini named CLUTTR.ini This new ini will be in Ntab's application directory. And, after that first initial launch, any of the following will also then be used just to launch Ntab with the specified ini

              H="Load cluttr_ini NoteTab"
              ^!^$GetAppFileName$ /INI=CLUTTR

              H="Load cluttr_ini NoteTab_2"
              ^!Shell "^$GetAppFileName$" /INI=CLUTTR

              H="Load cluttr_ini NoteTab_3"
              ^!Shell ^$GetShort("^$GetAppFileName$")$ /INI=CLUTTR

              (next line is in target field of my desktop shortcut)
              "C:\Program Files\NoteTab Pro\NotePro.exe" /INI=CLUTTR

              all libraries with clips show up in either of several alternate ini NoteTabs.

              With 2 Ntabs simultaneously open, I went to my CLUTTR.ini NoteTab and, from within it, I just tried to launch the clip that opens CLUTTR.ini NoteTab. And it refused to do anything (good news). Then I went to my notepro.ini Ntab and again launched the same clip. All it did was it focused the 2nd (CLUTTR.ini) Ntab. Though I've never tried it, perhaps action would be different with multiple instances switched on.

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