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

Re: [Clip] Auto-running Clip at NoteTab Startup

Expand Messages
  • Larry Hamilton
    I created a clip to create commandlines. I use it to create a shortcut for a specific project. I do not believe there are any new command line options since I
    Message 1 of 5 , Apr 20, 2003
    • 0 Attachment
      I created a clip to create commandlines. I use it to create a shortcut for a
      specific project. I do not believe there are any new command line options
      since I wote it.

      Larry

      ---------< start clip >---------
      H="NoteTab CommandLine"
      ;Larry Hamilton <lmh@...>
      ;04/20/2003, 10:08:21 PM
      ;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%"
      ---------< end clip >-----------

      Christine wrote:
      > oooOOOOoooo Jody!
      > I didn't know that. This is too neat! Thanks. :)
      >
      > Christine
      >
      > -----Original Message-----
      > From: Jody [mailto:av1611@...]
      > Sent: Saturday, April 19, 2003 6:16 PM
      > To: ntb-clips@yahoogroups.com
      > Subject: Re: [Clip] Auto-running Clip at NoteTab Startup
      >
      >
      > Hi Don,
      >
      >> Is there a way to make a clip run fully automatically (I'm using
      >> NotePro but also have Light) when NoteTab is started. I have
      >> found that I can create a clip entitled OnOpen which will run
      >> when its library is opened, but having the library open by
      >> default doesn't start the clip. It seems that the library must
      >> be closed and then re-opened. If there's not now, is that
      >> another "goodie" planned for ver 5.0?
      >
      > Yes, you can do that you want via the command-line.
      >
      > Your full path to NoteTab:
      >
      > "c:\program files\NoteTab Pro\NotePro.exe" /L=kewl
      > "c:\program files\NoteTab Pro\NotePro.exe" /L="kewl:RunClip"
      >
      > /L=LibraryName:RunClip
      > Changes the default Clip library to the one indicated by
      > LibraryName (without extension or path). Optionally use RunClip
      > to specify a Clip to execute once NoteTab is open.
      >
      >
      > c ya,
      > jody
    Your message has been successfully submitted and would be delivered to recipients shortly.