Board index » delphi » Clipboard handling.

Clipboard handling.

I want to write the following in TP/BP/BPW - I have BP7.01 :-

program TOGLCLIP ;
<procedures &c>
var Buffer : sometype ;
begin
  ReadClipBoard(Buffer) ;
  FiddleWith(Buffer) { This is the part that I CAN do } ;
  WriteClipBoard(Buffer) ;
  end.

It would be even better if it could read the selected part of the top
window (as Copy), FiddleWith, then write (as Paste) replacing that part.

Anyone done it?

--
John Stockton, Surrey, UK.    j...@merlyn.demon.co.uk    Turnpike v1.12    MIME.
  Web URL: http://www.merlyn.demon.co.uk/ - FAQqish topics, acronyms and links.

 

Re:Clipboard handling.


Quote
Dr John Stockton wrote:

> I want to write the following in TP/BP/BPW - I have BP7.01 :-

> program TOGLCLIP ;
> <procedures &c>
> var Buffer : sometype ;
> begin
>   ReadClipBoard(Buffer) ;
>   FiddleWith(Buffer) { This is the part that I CAN do } ;
>   WriteClipBoard(Buffer) ;
>   end.

Depends what is on the clipboard.  You'll have to treat different
clipboard data types differently.  In the BP help system, look up
"Clipboard functions".

Quote

> It would be even better if it could read the selected part of the top
> window (as Copy), FiddleWith, then write (as Paste) replacing that part.

Are you talking about some sort of bitmap image or what?

Hth.,

- Alf

Re:Clipboard handling.


In article <349C81D7.6...@online.no> of Sun, 21 Dec 1997 03:41:27 in
comp.lang.pascal.borland, "Alf P. Steinbach" <al...@online.no> wrote:

Quote
>Dr John Stockton wrote:
>> I want to write the following in TP/BP/BPW - I have BP7.01 :-
>> program TOGLCLIP ;
>> <procedures &c>
>> var Buffer : sometype ;
>> begin
>>   ReadClipBoard(Buffer) ;
>>   FiddleWith(Buffer) { This is the part that I CAN do } ;
>>   WriteClipBoard(Buffer) ;
>>   end.

>Depends what is on the clipboard.  You'll have to treat different
>clipboard data types differently.  In the BP help system, look up
>"Clipboard functions".

>> It would be even better if it could read the selected part of the top
>> window (as Copy), FiddleWith, then write (as Paste) replacing that part.

>Are you talking about some sort of bitmap image or what?

Thanks. At the moment, I am only interested in handling plain text, or
possibly other formats including text.  The immediate wish is to invert
the case of all text.

--
John Stockton, Surrey, UK.    j...@merlyn.demon.co.uk    Turnpike v1.12    MIME.
  Web URL: http://www.merlyn.demon.co.uk/ - FAQqish topics, acronyms and links.
  Correct 4-line sig separator is as above, a line comprising "-- " (SoRFC1036)
  Before a reply, quote with ">" / "> ", known to good news readers (SoRFC1036)

Re:Clipboard handling.


JRS:  In article <Pine.SOL.3.91.971221234640.5367A-
100...@fan1.fan.nb.ca> of Sun, 21 Dec 1997 23:54:30 in
comp.lang.pascal.borland, Jeff Patterson <aa...@fan.nb.ca> wrote:

Quote
>On Sat, 20 Dec 1997, Dr John Stockton wrote:

>> I want to write the following in TP/BP/BPW - I have BP7.01 :-

>> program TOGLCLIP ;
>> <procedures &c>
>> var Buffer : sometype ;
>> begin
>>   ReadClipBoard(Buffer) ;
>>   FiddleWith(Buffer) { This is the part that I CAN do } ;
>>   WriteClipBoard(Buffer) ;
>>   end.

>> It would be even better if it could read the selected part of the top
>> window (as Copy), FiddleWith, then write (as Paste) replacing that part.

>> Anyone done it?

>SWAG has a unit called WINCLIP which will do such (even compiles in DPMI).
>The interrupts are listed in Ralf Brown's Interrupt List.
>INT 2Fh   ax=17xxh  search for "WINOLDAP"  (with the quotes should find it)
>In version 55 they are in Interrup.J
>Note: I never tried the unit nor the interrupts...

What I could find in SWAG was not sufficient help, as I have no
experience with programming the Windows interface.  Has anyone got
working code for my job (apart from my FiddleWith, which is easy) ?

--
John Stockton, Surrey, UK.    j...@merlyn.demon.co.uk    Turnpike v1.12    MIME.
  Web URL: http://www.merlyn.demon.co.uk/ - TP/BP/&c. FAQqish topics and links.
  Timo's TurboPascal <A HREF="ftp://garbo.uwasa.fi/pc/link/tsfaqp.zip">FAQ</A>.
  <A HREF="http://www.merlyn.demon.co.uk/clpb-faq.txt">Mini-FAQ</A> of c.l.p.b.

Re:Clipboard handling.


JRS:  In article <xKzWxmA9gnr0E...@merlyn.demon.co.uk> of Sat, 3 Jan
1998 17:41:17 in comp.lang.pascal.borland, Dr John Stockton

Quote
<j...@merlyn.demon.co.uk> wrote:
>JRS:  In article <Pine.SOL.3.91.971221234640.5367A-
>100...@fan1.fan.nb.ca> of Sun, 21 Dec 1997 23:54:30 in
>comp.lang.pascal.borland, Jeff Patterson <aa...@fan.nb.ca> wrote:
>>On Sat, 20 Dec 1997, Dr John Stockton wrote:
>>> I want to write the following in TP/BP/BPW - I have BP7.01 :-
>>> program TOGLCLIP ;
>>>   ReadClipBoard(Buffer) ;
>>>   FiddleWith(Buffer) { This is the part that I CAN do } ;
>>>   WriteClipBoard(Buffer) ;
>>> It would be even better if it could read the selected part of the top
>>> window (as Copy), FiddleWith, then write (as Paste) replacing that part.

(above pruned)

I should have crossposted from borland.public.turbopascal, but too late
now; just to say here that Pedt Scragg has provided the solution there.

--
John Stockton, Surrey, UK.    j...@merlyn.demon.co.uk    Turnpike v1.12    MIME.
  Web <URL: http://www.merlyn.demon.co.uk/> - TP/BP/&c. FAQqish topics & links.
  Timo's TurboPascal <A HREF="ftp://garbo.uwasa.fi/pc/link/tsfaqp.zip">FAQ</A>.
  <A HREF="http://www.merlyn.demon.co.uk/clpb-faq.txt">Mini-FAQ</A> of c.l.p.b.

Re:Clipboard handling.


In article <EDlHXPA3vev0E...@merlyn.demon.co.uk>, Dr John Stockton
<j...@merlyn.demon.co.uk> writes

Quote

>I should have crossposted from borland.public.turbopascal, but too late
>now; just to say here that Pedt Scragg has provided the solution there.

I'll put a copy of the unit, in case anyone else wants it, for accessing
the Windows Clipboard to get *text* in *real* mode up on my web site
over the weekend from
http://www.pedt.demon.co.uk/
--
Pedt Scragg                    <postmas...@pedt.demon.co.uk>

Never curse the Crocodile's mother before crossing the river

Other Threads