[futurebasic] Re: [FB] Printing to Clipboard

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : October 2001 : Group Archive : Group : All Groups

From: Chris Stasny <staz@...>
Date: Tue, 23 Oct 2001 17:00:19 -0500
>Earlier Robert C. posted this code which takes the Print strings and 
>transfers them to the Clipboard. Robert says it needs Release 4 or 
>higher to run. I am running Release 5 here, but can't get it copy 
>the strings.
>I want to include FN TextToClip on the Turbo Function Library I have 
>compiled in conjunction with the FB^3 Rosetta Stone Library, but I 
>want to make sure only working demos are published in the library. 
>Robert retested it on his end and said it was working fine. I'm 
>requesting that you take a moment or two and test it on your 
>platform. May be an extension problem on my end.
>If any of you have you own favorite functions, please feel free to share them.
>LOCAL FN TextToClip (TextH as handle)
>'---> Variables
>DIM ScrapH as handle
>DIM ClipText$,ScrapSize&,OSErr%
>'---> Make Text For Clip
>LONG IF (TextH = 0)
>Exit FN
>'---> Get Clipboard Ready
>ScrapH     = FN ZEROSCRAP
>call HLOCK(TextH)
>'---> Copy Text to Clipboard
>LONG IF fn memerror = _noErr
>ScrapH = FN PUTSCRAP (ScrapSize&, _"TEXT", [TextH])
>call HUNLOCK(TextH)
>Local FN PrintToClip
>ROUTE _toBuffer +1 // for example
>Print "I am the King of All ClipDom."
>Print "Even the Clipdom of Ian's Sheep."
>Print "What a Wool.rld."
>Route _ToScreen
>FN TextToClip (gFBBuffer(1))
>DEF DISPOSEH(gFBbuffer(1))
>End FN
>FN PrintToClip

works here.


-STAZ  ~)~

800.348.2623 Orders  http://www.stazsoftware.com
228.255.7086 FAX     mailto:staz@...