realbasic-nug
[Top] [All Lists]

Re: getting the content of text clippings

To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: getting the content of text clippings
From: Sven E Olsson <lists at seedit dot info>
Date: Thu, 1 Nov 2007 01:33:53 +0100
Delivered-to: listarchive at realsoftware dot com
Delivered-to: realbasic-nug at lists dot realsoftware dot com
References: <83F302E1-6687-49C3-8088-54C024E51CE3 at bttb dot net dot bd>
On 2007-11-01, at 01:10, Carlo Rubini wrote:

> Hello,
>
> does anybody know how to get the content of a text clipping (mac) ?
>
> b = f.openasbinaryfile(false)
> msgbox b.read(b.length)
>
> returns nothing
>
> Suggestions welcome.
>
> Carlo
>
>
>

I found some old code, I open a Clip file from a list-box and insert  
the text ....

   dim f as folderitem
   dim s, ClippStr as string
   dim rf as ResourceFork

   if me.listindex <> -1 then
     s = me.Cell(me.ListIndex,1)
     f = GetFolderItem(s)
     if f <> nil then
       if f.Exists then
         rf = f.OpenResourceFork
         ClippStr = rf.GetResource("TEXT",256)
         rf.close
         PutCommandString(ClippStr)
        end if ' exists
     end if ' nil
   end if ' listindex

Sven E

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>


<Prev in Thread] Current Thread [Next in Thread>