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

3534RE: [Clip] Multiple Choice Clip Wizard

Expand Messages
  • Raymond Fitzgerald
    May 1, 2000
    • 0 Attachment
      Hi Skylight,

      >I want/need to create a NTP clip that will show me a list of,
      >say, 20-30 often used keywords, where I can choose multiple
      >choices. Upon clicking "OK" the choices should be written to the
      >clipboard awaiting pasting...

      Jody and I must have been working on this at the same time! Well, here's
      another--actually a short and a long version. The short version requires you
      to maintain your list inside the clip:

      H="Keywords short"
      ; 050100/rayfitz
      ^!SetListDelimiter |
      ; long line follows!
      ^!Set %Keywords%=^?{(T=A;H=28)Choose your
      keyword(s)=Favorite|Nature|Maps|Space|Waterfalls|ClipArt|Buttons|Animations|
      Bars|Family|Friends|Funnies|Wallpaper_0640x0480|Wallpaper_0800x0600|Wallpape
      r_1024x0768}
      ; end of long line
      ^!SetClipBoard ^$StrReplace("|";", ";"^%Keywords%";False;False)$
      ^!Info Clipboard contains:^p^p^$GetClipBoard$
      ; end of clip

      The long version uses an INI (named after the library in which you place the
      clip) to save your keywords. The wizard also lets you add new keywords in
      addition to (or instead of) selecting existing keywords. You add them one at
      a time so that they're instantly added to the INI. The very last one added
      is defaulted to the next time you run the clip--I don't know whether this is
      desirable or undesirable behavior for you, but it can be changed.

      A note about the line:
      ^!IfFalse ^$IsEmpty(^$GetValue("ACDSee:Keywords")$)$ Skip
      This and the line following (^!SaveValue) serve to initially "load" the
      values into the INI. After that, the ^!SaveValue is always skipped--unless
      you delete the INI, copy the clip to another clip library, etc. So if
      additional keywords get added to the INI via the clip, you'll want to "back
      them up" by manually adding them inside the clip too.

      In if testing the clip you add some test values, here's a quick way to
      remove them from the INI. Just comment out the ^!IfFalse line and run the
      clip. You'll see the default list displayed again. (Don't forget to go back
      and uncomment the line!)

      Here's the long version:

      H="Keywords long"
      ; 050100/rayfitz
      ^!SetIniFile ^$GetLibraryName$
      ^!SetListDelimiter |
      ^!IfFalse ^$IsEmpty(^$GetValue("ACDSee:Keywords")$)$ Skip
      ; two long lines follow!
      ^!SaveValue
      ACDSee:Keywords=Favorite|Nature|Maps|Space|Waterfalls|ClipArt|Buttons|Animat
      ions|Bars|Family|Friends|Funnies|Wallpaper_0640x0480|Wallpaper_0800x0600|Wal
      lpaper_1024x0768
      ^!Set %Keywords%=^?{(T=A;H=28)Choose your
      keyword(s)=^$GetValue("ACDSee:Keywords")$}; %Add%=^?{Add a new
      keyword?==_No|Yes}
      ; end of two long lines
      ^!IfTrue ^%Add% Next else Info
      :LOOP
      ^!Set %New%=^?{Enter new keyword}
      ^!SaveValue
      ACDSee:Keywords=^$SetDefaultValue(^$GetValue("ACDSee:Keywords")$;^%New%)$
      ^!Set %Pipe%=""
      ^!If ^%Keywords% = "" Skip
      ^!Set %Pipe%=|
      ^!Append %Keywords%=^%Pipe%^%New%
      :INFO
      ^!SetClipBoard ^$StrReplace("|";", ";"^%Keywords%";False;False)$
      ^!Info Clipboard contains:^p^p^$GetClipBoard$
      ^!IfTrue ^%Add% Next Else End
      ^!Skip Add another keyword?
      ^!Goto End
      ^!Goto Loop
      ; end of clip

      Cheers,
      Ray
    • Show all 4 messages in this topic