Clipboard TEXT

Post Reply
User avatar
Jimmy
Posts: 1734
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Clipboard TEXT

Post by Jimmy »

hi,

i copy Filename from App to Clipboard
later i paste from Cliboard back to App and want "goto" File

but it does not work :shock:

paste Filename into Notepad
mark Filename "in" Notepad and copy back to Clipboard

now it work :D

---

than i had a look into Logfile and found
28.02.2023 07:46:42: COPYTOCLIPBOARD( 3386 ) cText = E"C:\fwh\0\LISTVIEW\TGRID.BAK\r\n "
28.02.2023 07:47:08: TEXTFROMCLIPBOARD( 3400 ) cText = E"C:\fwh\0\LISTVIEW\TGRID.BAK\r\n"

28.02.2023 07:47:25: TEXTFROMCLIPBOARD( 3400 ) cText = "C:\fwh\0\LISTVIEW\TGRID.BAK"
where are E and \r\n come from :?:
how can i get rid of it :?:

---

Code: Select all | Expand

FUNCTION CopyToClipboard( cText )
LOCAL oClip := TClipBoard() :New()

   IF oClip:Open()
      oClip:SetText( cText )
*      oClip:SetWideText( cText )
      oClip:Close()
   ENDIF
   oClip:End()
RETURN nil

Code: Select all | Expand

FUNCTION TextFromClipboard()
LOCAL cText := ""
LOCAL oClip := TClipBoard() :New()

   IF oClip:Open()
      cText := oClip:GetText()
*      cText := oClip:GetUnicodeText()
      oClip:Close()
   ENDIF
   oClip:End()
RETURN cText
 
greeting,
Jimmy
Post Reply