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

16853Re: [Clip] ntp 4.95 PasteClips.clb - Dates?

Expand Messages
  • Sheri
    Aug 15, 2007
      Pat(kitPatH) wrote:
      > hi! thanks to the writer of PasteClips! for autofill in other apps.
      > is it literal only? I would like to insert the date in apps that don't have the function.
      > i've tried
      > ^$GetDate(mm/dd/yyyy)$
      > and i've tried passing the date to a variable and the pasting it - of course those
      > ideas didn't work.
      > Is it possible? how?
      > thanks -- pat
      Hi Pat,

      PasteClips is one of the libraries included with NoteTab. Just took a
      quick look, the OnClipboardChange clip in that library sets the
      clipboard to the *content* of the clip whose name you have copied to the
      clipboard, it does not actually execute said clip. To do what you want,
      a clip must be executed that sets the clipboard to ^$GetDate(mm/dd/yyyy)$.

      I tried this and it worked:

      added a clip called _DoDate.

      ^!SetClipboard ^$GetDate(mm/dd/yyyy)$
      ;end of clip

      modified the clip _OnClipboardChange:

      added these three lines at line 7:

      ^!IfSame "^$GetClipboard$" "dt" Next Else Skip_2
      ^!Clip DoDate
      ^!Goto Skip_1

      note the next line in the clip reads: ^!CopyClip ^$GetClipboard$

      Now when I type "dt" in another app and copy that to the clipboard, it
      gets overwritten with the current date. Otherwise, it works as before:
      places the matching clip's contents on the clipboard and substitutes
      that text in the other app. Works in NTP 5.3, so I expect it will also
      work in 4.95.

      Hope it helps,
    • Show all 3 messages in this topic