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

ntp 4.95 PasteClips.clb - Dates?

Expand Messages
  • Pat(kitPatH)
    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.
    Message 1 of 3 , Aug 15, 2007
    • 0 Attachment
      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
    • Sheri
      ... 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
      Message 2 of 3 , Aug 15, 2007
      • 0 Attachment
        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.

        H=_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,
        Sheri
      • Pat
        Sheri, you always come thru for me. Thanks for explaining the steps. The code works great! pat
        Message 3 of 3 , Aug 16, 2007
        • 0 Attachment
          Sheri, you always come thru for me. Thanks for explaining the steps.
          The code works great! pat
        Your message has been successfully submitted and would be delivered to recipients shortly.