Menu

Copy and append text to the clipboard

DrScript
2004-06-24
2004-07-17
  • Franz Steinhaeusler

    #drscript
    #This drScript appends the selected text to the Clipboard
    #francescoa 2004/06/24
    #version 1.0
    wx.TheClipboard.Open()
    do = wx.TextDataObject()
    cur_clip_data =""
    tmp = wx.TheClipboard.GetData(do)
    if tmp: cur_clip_data = do.GetText()
    cur_clip_data += DrDocument.GetSelectedText()
    wx.TheClipboard.SetData(wx.TextDataObject(cur_clip_data))
    wx.TheClipboard.Close()

    for "cut and append", following last line should be added:
    DrDocument.ReplaceSelection ('')

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.