Skip to main content
1-Visitor
March 29, 2014
Question

ACL to clear the Windows clipboard

  • March 29, 2014
  • 2 replies
  • 739 views
Whacky. But I needed to do this an stumbled on a way how to do it. Maybe
it's useful to someone else.


# The following may have dependencies on sgmlselection, selectionsvc,
pastepreserve,
# and/or any other settings related to buffers, copying, pasting, etc.


# Create a temporary buffer and make it current.
set paste=junk

# write to that buffer. You could select and copy something if
# wherever you that is easy. Or you can just write a line of
# throw-away text to the buffer. Type "help insert_buffer" for
# a complete description of the syntax of this command.
insert_buffer("any string of text",0,"junk")

# Set the default buffer back to current.
set paste=default


I had to tell you now because it's Friday and my weekend will permanently
purge MY buffer and I won't remember I wanted to tell you come Monday ...

--
Paul Nagai

    2 replies

    1-Visitor
    March 29, 2014

    delete_buffer -all;


    clears Arbortext paste buffers -- but not apparently the Windows clipboard--so don't know if this helps.


    - Lou Argyres


    CEB / Continuing Education of the Bar | ceb.com



    In Reply to Paul Nagai:


    Whacky. But I needed to do this an stumbled on a way how to do it. Maybe
    it's useful to someone else.


    # The following may have dependencies on sgmlselection, selectionsvc,
    pastepreserve,
    # and/or any other settings related to buffers, copying, pasting, etc.


    # Create a temporary buffer and make it current.
    set paste=junk

    # write to that buffer. You could select and copy something if
    # wherever you that is easy. Or you can just write a line of
    # throw-away text to the buffer. Type "help insert_buffer" for
    # a complete description of the syntax of this command.
    insert_buffer("any string of text",0,"junk")

    # Set the default buffer back to current.
    set paste=default


    I had to tell you now because it's Friday and my weekend will permanently
    purge MY buffer and I won't remember I wanted to tell you come Monday ...

    --
    Paul Nagai
    naglists1-VisitorAuthor
    1-Visitor
    March 29, 2014
    Hi Lou,

    The code I provided does clear the Windows clipboard ... with some
    assumptions about the various settings that relate to cut/copy/paste/buffer
    management. Turns out I also delete_buffer -all after clearing the Windows
    clipboard for the thing I'm doing, but it wasn't necessary/related to
    clearing the Windows clipboard so I didn't mention it.

    Thanks, though. It's probably good to have available in this thread for
    future me and anyone else diving into the buffers.