paste in -gtwvt

303 views
Skip to first unread message

fperillo

unread,
Jan 24, 2012, 10:34:42 AM1/24/12
to Harbour Users
How to do a "paste" when using -gtwvt ?

Francesco

Massimo Belgrano

unread,
Jan 24, 2012, 11:48:55 AM1/24/12
to harbou...@googlegroups.com
without modification You can only copy  
or follow this way
#include "Hbgtinfo.ch"
FUNCTION MAIN()
   LOCAL GetList := {}, myGet
   myGet := PADR(HB_GTINFO(  HB_GTI_CLIPBOARDPASTE ),30)
   @ 1, 1 say "From clipboard" GET myGet
   READ

   RETURN NIL

image.png

2012/1/24 fperillo <fper...@gmail.com>
How to do a "paste" when using -gtwvt ?

Francesco

--
You received this message because you are subscribed to the Google
Groups "Harbour Users" group.
Unsubscribe: harbour-user...@googlegroups.com
Web: http://groups.google.com/group/harbour-users



--
Massimo Belgrano


image.png

francesco perillo

unread,
Jan 24, 2012, 11:59:59 AM1/24/12
to harbou...@googlegroups.com
ok.... so I may have a SET KEY F9 to paste()
and in paste() have a keyboard( HB_GTINFO(  HB_GTI_CLIPBOARDPASTE ) )

....

I will try

Thank you
Francesco
image.png

francesco perillo

unread,
Jan 24, 2012, 6:00:45 PM1/24/12
to harbou...@googlegroups.com
just to confirm that

set key K_F6     to forcePaste()
function forcePaste()

keyboard( HB_GTINFO(  HB_GTI_CLIPBOARDPASTE ) )
return .t.

Now I should only check if ctrl-v or shift-ins have a keycode...

Thanks

Viktor Szakáts

unread,
Jan 24, 2012, 6:12:10 PM1/24/12
to harbou...@googlegroups.com
> keyboard( HB_GTINFO( HB_GTI_CLIPBOARDPASTE ) )

HB_GTI_CLIPBOARDPASTE is already stuffing the 
clipboard into the keyboard buffer, so it's enough to use:
   hb_gtInfo( HB_GTI_CLIPBOARDPASTE )

If you need the content of the clipboard as a string, use:
   hb_gtInfo( HB_GTI_CLIPBOARDDATA )

To set the clipboard:
   hb_gtInfo( HB_GTI_CLIPBOARDDATA, <cData> )

These work with all GTs, not just GTWVT.

Viktor

Reply all
Reply to author
Forward
0 new messages