Re: [Clip] Clip bar library versus the current library
- Hi Eb,
>> Yes, or just make ^$GetLibraryName$ do that. If you are theI meant, you know which Library the Clipbar Clip is in or any
>> one running the Clip you ought to know what Library it is in
>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.
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
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? :)
Subscribe, UnSubscribe, Options
- Hi Eb and Jody,
At 05:54 PM 09/01/2000 -0400, you wrote:
>Hi Jody,This is a bit tedious but if you have the will here is another way to be
>>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.
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?).
^!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.
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.