Monitor clipboard and paste into Xbrowse

Monitor clipboard and paste into Xbrowse

Postby Marc Venken » Thu May 14, 2020 1:20 pm

I want to automaticaly paste the content of the clipboard into a next new line in xbrowse.

I have a app that puts a dataline into the clipboard.. FW should be listening (background) if there is a text in the keyboard and paste in into a xbrowse line, and clears the clipboard for next reading.

Any ideas

Marc
Marc Venken
Using: FWH 23.04 with Harbour
User avatar
Marc Venken
 
Posts: 1446
Joined: Tue Jun 14, 2016 7:51 am
Location: Belgium

Re: Monitor clipboard and paste into Xbrowse

Postby Marc Venken » Thu May 14, 2020 9:14 pm

This is almost ok..

Should I look into Xbrowse for 'listening if clipboard is not empty ' or the program itself ?


Code: Select all  Expand view  RUN

function testclip
  local oBrw, oWnd

  DEFINE CLIPBOARD oClp

  aStruct := {}
  AADD(aStruct, { "email"   , "C",  150, 0 })

  DbCreate( "testmail.dbf", aStruct)
  use testmail new

   DEFINE FONT oFont NAME "Courier New" SIZE 8,15

   DEFINE DIALOG oDlg SIZE 640,440 PIXEL ;
      FONT oFont TITLE 'Import email'

   @ 10, 10 XBROWSE oBrwmail OF oDlg ;
      SIZE 300, 200 PIXEL ;
      COLUMNS 'email' ;
      ALIAS 'testmail' NOBORDER

      oBrwmail:bRClicked := { || placemail() }


   WITH OBJECT oBrwmail

      :nColDividerStyle := LINESTYLE_LIGHTGRAY
      :nRowDividerStyle := LINESTYLE_LIGHTGRAY
      :nEditTypes    := EDIT_GET
      :bClrRowFocus     := { || { CLR_BLACK, RGB(185,220,255) } }
      :nMarqueeStyle    := MARQSTYLE_HIGHLROWMS

      :CreateFromCode()
   END
   ACTIVATE DIALOG oDlg CENTERED

   close all

return

function placemail
    cText = oClp:getText()
    testmail->(dbappend())
    testmail->email = cText
    obrwmail:refresh()
return

 
Marc Venken
Using: FWH 23.04 with Harbour
User avatar
Marc Venken
 
Posts: 1446
Joined: Tue Jun 14, 2016 7:51 am
Location: Belgium


Return to FiveWin for Harbour/xHarbour

Who is online

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