Clipboard TEXT

Clipboard TEXT

Postby Jimmy » Tue Feb 28, 2023 7:11 am

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 view  RUN
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 view  RUN
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
User avatar
Jimmy
 
Posts: 1732
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 102 guests