• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Detecting if text is styled
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Detecting if text is styled


  • Subject: Re: Detecting if text is styled
  • From: "Arthur J. Knapp" <email@hidden>
  • Date: Wed, 27 Nov 2002 11:01:56 -0500

> Date: Tue, 26 Nov 2002 16:54:34 -0600
> From: ehsan saffari <email@hidden>
> Subject: Re: Detecting if text is styled

> On 26/11/2002 13:03, "Arthur J. Knapp" <email@hidden> wrote:
>> on ClassCode(v)
>> (*
>> * HACK !!!
>> *)
>> return ({{p:v}} as string)'s text 39 thru 42
>> end ClassCode
>>
>> on IsStyledText(v)
>> return ClassCode(v) = "STXT"
>> end IsStyledText
>>
>> IsStyledText(the clipboard) --> true/false


> Now the problem is, what is really styled text? I copy a piece of text
> out of Note pad (which has no clue about styled text), I check the
> clipboard, it says its text (NOT styled text) but the hack above reports
> it's styled text....or is it? and if I copy some formatted AS code out of
> SD, clipboard says it's styled and so does the hack..

Yes, this is very strange. When I copied a piece of text out of Note Pad,
(after running around the office to see if anyone HAD a copy of Note Pad),
the Finder reported it as "text", (the Finder's Show Clipboard command).
I then did the same with a piece of styled text from Script Debugger and
the Finder reported it as "styled text". Any call to "the clipboard" seems
to return text in a styled text "wrapper" by default. Perhaps Jon Pugh could
shed some light on this?


{ Arthur J. Knapp, of <http://www.STELLARViSIONs.com>
a r t h u r @ s t e l l a r v i s i o n s . c o m
}
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: Detecting if text is styled
  • Next by Date: Careful what numbers you show!
  • Previous by thread: Re: Detecting if text is styled
  • Next by thread: Re: Detecting if text is styled
  • Index(es):
    • Date
    • Thread