• 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: TextEdit and Text Item Delimiters
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: TextEdit and Text Item Delimiters


  • Subject: Re: TextEdit and Text Item Delimiters
  • From: Emmanuel <email@hidden>
  • Date: Fri, 2 Aug 2002 23:53:22 +0200

At 12:58 AM +0200 1/8/02, Christopher Nebel wrote:
>
>On Wednesday, July 31, 2002, at 03:36 PM, email@hidden wrote:
>
>> But now I'm trying:
>> tell app "TextEdit" to set allText to the text of document 1
>>
>> set keepSafe to AppleScript's text item delimiters
>> set AppleScript's text item delimiters to {"="}
>> set keyParagraph to first paragraph whose first text item is "foo"
>>
>As an alternate path, you might try returning to the all-TextEdit
>version, but try using "word n" instead of "text item n". Given your
>data so far, they amount to the same thing, but won't if you start
>throwing in spaces. Failing that, it's always possible to emulate
>"whose" expressions using explicit loops. It's a pain and you shouldn't
>have to, but it does work.

In case Seth is not aware of that, I recall that a widely spread tool for
performing such text processings is the Regular Expressions.

Several Scripting Additions for OS9 (including the Satimage osax), a few
for OSX (including the Satimage osax), implement the Regular Expressions
into AppleScript. Such Scripting Additions let you perform such searches on
AppleScript string variables.

A slightly more comfortable way is to use Smile (a cool editor for
AppleScript that is free) which (both in 9 and X) implements Regular
Expressions which can be used to search AppleScript string variables, but
also to search Smile's Text Windows.

Emmanuel
<netiquette>we make Smile and the Satimage osax</netiquette>
<http://www.satimage-software.com>
_______________________________________________
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: "+" and "-" are numbers.
  • Next by Date: Re: Dose anyone know....
  • Previous by thread: Re: Quark style and character sheets -- is "normal" always spec number 1?
  • Next by thread: Re: Dose anyone know....
  • Index(es):
    • Date
    • Thread