FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour How do I read from Clipboard?
Posts: 1598
Joined: Fri Oct 07, 2005 05:56 PM
How do I read from Clipboard?
Posted: Tue Oct 31, 2017 08:37 AM

Dear all,

I need to copy to clipboard and use button to read from clipboard without pressing on keyboard.

I can use as below to copy to clipboard.
oGet:SelectAll()
oGet:Copy()

But I need to paste in another program (FWH) and I need to use button for paste from clipboard.

Thank you in advance for any idea.

Regards,

Dutch



FWH 2304 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio

FWPPC 10.02 / Harbour for PPC (FTDN)

ADS V.9 / MySql / MariaDB

R&R 12 Infinity / Crystal Report XI R2

(Thailand)
Posts: 1598
Joined: Fri Oct 07, 2005 05:56 PM
Re: How do I read from Clipboard?
Posted: Tue Oct 31, 2017 08:55 AM
Dear All,

I test by oGet:Paste() but it got an error;
Code (fw): Select all Collapse
   Error description: Error BASE/1111  Argument error: LEN
   Args:
     [   1] = U   

Stack Calls
===========
   Called from:  => LEN( 0 )
   Called from: TGET.PRG => TGET:PASTE( 1867 )
   Called from: testget.prg => (b)MAIN( 25 )

Error this line in TGET.PRG
Code (fw): Select all Collapse
      nLen = Len( ::oGet:Buffer )
Regards,

Dutch



FWH 2304 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio

FWPPC 10.02 / Harbour for PPC (FTDN)

ADS V.9 / MySql / MariaDB

R&R 12 Infinity / Crystal Report XI R2

(Thailand)
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: How do I read from Clipboard?
Posted: Tue Oct 31, 2017 09:08 AM
Try this:

Code (fw): Select all Collapse
oClp = TClipBoard():New( , oDlg )

oClp:Open()

cTxt = oClp:GetText()

oClp:Close()


EMG
Posts: 1598
Joined: Fri Oct 07, 2005 05:56 PM
Re: How do I read from Clipboard?
Posted: Tue Oct 31, 2017 10:39 AM
Dear EMG,

Thanks a lot. I've got it.
Enrico Maria Giordano wrote:Try this:

Code (fw): Select all Collapse
oClp = TClipBoard():New( , oDlg )

oClp:Open()

cTxt = oClp:GetText()

oClp:Close()


EMG
Regards,

Dutch



FWH 2304 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio

FWPPC 10.02 / Harbour for PPC (FTDN)

ADS V.9 / MySql / MariaDB

R&R 12 Infinity / Crystal Report XI R2

(Thailand)

Continue the discussion