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

Re: [Clip] Clip bar library versus the current library

Expand Messages
  • Jody
    Hi Eb, ... I meant, you know which Library the Clipbar Clip is in or any Clip that you are running, so ^$GetLibraryName$ does not need to return the Library
    Message 1 of 10 , Sep 2, 2000
      Hi Eb,

      >> Yes, or just make ^$GetLibraryName$ do that. If you are the
      >> one running the Clip you ought to know what Library it is in
      >> already.
      >
      >But that was precisely the problem -- I didn't know which library
      >was going to be default when the clipbar clip was being run. I
      >needed to get the default library name, not clipbar.clb.

      I meant, you know which Library the Clipbar Clip is in or any
      Clip that you are running, so ^$GetLibraryName$ does not need to
      return the Library name of that Clip. Instead, it could return
      the name of the Library that is loaded in the Clipbook. If you
      use the ^!Clip or ^!FarClip command, you still know what clip is
      being run.

      I cannot think of any case where you would not know unless you
      purposely made some type of random picker to run a Clip from a
      list of Clip names. I use the time though to get a primitive
      random generator though in my SureWord Library activate a popup.
      I made it way back in v4.0 so I am sure by know I could use a
      better method, but why fix something that works, eh? :)

      Happy Clip'n!
      Jody

      http://www.sureword.com/notetab

      Subscribe, UnSubscribe, Options
      mailto:Ntb-Clips-Subscribe@...
      mailto:Ntb-Clips-UnSubscribe@...
      http://www.egroups.com/group/ntb-clips
    • Larry Thomas
      Hi Eb and Jody, ... This is a bit tedious but if you have the will here is another way to be sure you have the default library name retrieved by a clipbar
      Message 2 of 10 , Sep 2, 2000
        Hi Eb and Jody,

        At 05:54 PM 09/01/2000 -0400, you wrote:
        >Hi Jody,
        >
        >>Yes, or just make ^$GetLibraryName$ do that. If you are the one
        >>running the Clip you ought to know what Library it is in already.
        >
        >But that was precisely the problem -- I didn't know which library was going
        >to be default when the clipbar clip was being run. I needed to get the
        >default library name, not clipbar.clb.

        This is a bit tedious but if you have the will here is another way to be
        sure you have the default library name retrieved by a clipbar clip. Add
        the following clip to all of your clip libraries (yes, I said all - very
        tedious isn't it?).

        H="OnOpen"
        ^!TextToFile "LibName.txt" ^$GetLibraryName$

        Then place the following clipcode into the clip located on the clipbar that
        you want to retrieve the current default library.

        H="LibraryName"
        ^!Info ^$GetFileText(LibName.txt)$

        If you already have an Onopen clip in a library just add the above code in
        "OnOpen" as the first line of that clip. Everytime you change libraries,
        the new library that you open will replace the name in LibName.txt with its
        own so when you run the "LibraryName" clip you will get the current default
        name whether that library is open or not.

        Regards,

        Larry
        larryt@...
      Your message has been successfully submitted and would be delivered to recipients shortly.