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

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

Expand Messages
  • Jody
    Hi Eb, ... Perhaps you missed my post about ^$SetDefaultValue(...)$ with an example in the SampleCode Library. Here it is with the default Libraries. I just
    Message 1 of 8 , Sep 3, 2000
    • 0 Attachment
      Hi Eb,

      >>I don't know exactly what you are doing,
      >
      >Me neither, ain't it exciting?!

      Perhaps you missed my post about ^$SetDefaultValue(...)$ with an
      example in the SampleCode Library. Here it is with the default
      Libraries. I just copied them from a Clip I use that anybody can
      get from my Libraries page to make real quick Library managers
      for the Clipbar (or just use as Clips). I use check boxes to
      either open/close All or selected Libraries. It is a no-brainer
      for anybody to make their own with in just a few clicks.

      http://www.sureword.com/notetab/zip/libtoggle.zip

      We have ^$GetFiles(...)$ also if you don't like DOS and will
      help prevent error like I got when running your Clip. Your's
      won't run on machines that need cmd.exe instead of command.com
      like we discussed not too long ago.

      Here is one I have in my LibToggle along with the first part of a
      work-around for Libraries starting with a "_" to prevent them
      from becoming a default (checked):

      ^!Set %AllLibraries%=^$GetFiles("^$GetLibraryPath$";*.clb;Name)$
      ^!Set %Libraries%=^$StrReplace("^$GetLibraryPath$";;"^%AllLibraries%";0;0)$
      ^!Set %Libraries%=^$StrReplace("_";"__";"^%Libraries%";0;0)$
      ^!Set %Libraries%=^$StrReplace(".clb";;"^%Libraries%";0;0)$

      This is how your remember the last used item in a wizard. You
      can do away with my keyboard thing or any ini file settings just
      by modifying your Clip a bit.

      H=Remember default value
      ;Create a new document
      ; ^!ToolBar New Document

      ;If the variable ValueList is not empty, skip the next instruction
      ^!IfFalse ^$IsEmpty(^%ValueList%)$ Skip
      ;Assign a list of values to the variable ValueList
      ^!Set %ValueList%=All|AutoCorrect|CaptureLinks|Euro|FormatEmail|FTP|_HTML|HTML-ar|PasteClips|RemindMe|SampleCode|Smilies|TxTPrint|TopStyle|Utilities

      ;Beginning of loop
      :StartLoop
      ;Promp user to select a value from the list in the Clip wizard
      ^!Set %DefaultValue%=^?{Choose or enter a new default value=^%ValueList%}
      ;Insert the chosen value in the document, followed by a line break
      ^!SetPasteIndent Off
      ^!InsertText Default value = ^%DefaultValue%^p
      ;Change the default-value marker to match the item chosen by the user
      ^!Set %ValueList%=^$SetDefaultValue(^%ValueList%;^%DefaultValue%)$
      ;Prompt user to continue or end Clip
      ^!Continue Continue demonstration?
      ;Jump back to the start of the loop
      ^!Goto StartLoop


      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
    • Eb Guenther
      Hi Jody, and Larry, My clip may not have run properly because of a long line split. There should only be a SINGLE LINE betweeen each pair of ;--- comment
      Message 2 of 8 , Sep 4, 2000
      • 0 Attachment
        Hi Jody, and Larry,

        My clip may not have run properly because of a long line split.
        There should only be a SINGLE LINE betweeen each pair of
        ";--- comment" lines

        When push comes to shove, I like small compact code. So I've
        reverted to a single wizard to pick libraries for the button bar,
        and defaulting to the previous library, which may or may not be
        hidden.

        If you are still interested in seeing what the clip does in the
        remaining 17 lines of code, make sure you are not splitting long
        lines and delete the 11 (eleven) lines at the end of the clip
        between (but not including):

        ^!If ^%ix%<^%NewOnList0% loop

        and

        ^!Refresh
        ;--- END OF CLIP


        The long discussion was informative on several fronts, but I'm
        going to have to move on.

        Thanks for all your suggestions.


        Cheers,

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