• 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: Tex-Edit, get wild text, even one letter.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Tex-Edit, get wild text, even one letter.


  • Subject: Re: Tex-Edit, get wild text, even one letter.
  • From: AppleScript Guru <email@hidden>
  • Date: Sat, 06 Oct 2001 11:47:47 -0400

Rachel,

on 10/6/01 10:47 AM, you said:

> I am using "r>^*<" to specify text to select, I want to select only the
> characters between but not including characters "><"
> This will not process one character, even if I insert a space to make two:

---> I haven't really Scripted Tex-Edit Pro too much, so there may be a
better way to do this. Give this a try...

tell application "Tex-Edit Plus"
tell window 1
repeat with i from 1 to (count lines)
if line i starts with "<td" then
search line i looking for "r>^*<"
select characters 3 thru -2 of selection
set color of every character of selection to red
end if
end repeat
end tell
end tell

Notes:
* Use -2 instead of -1. -1 will be the last character (the first character
from the end), which is "<", unless that's what you want too.
* Specify the name of the color, and not the number, and don't put it in
quotes. I believe that there are quite a few example scripts that come with
this application. I would recommend checking them out if you haven't
already.

The above script worked for me.

-Ben

Benjamin S. Waldie
Write Track Media
(AppleScript GuRu)

AppleScript Web Site:
http://www.AppleScriptGuru.com
http://www.wtmedia.com


References: 
 >Tex-Edit, get wild text, even one letter. (From: Gnarlodious <email@hidden>)

  • Prev by Date: File Sharing: time to draw folders
  • Next by Date: Set Selection with a list of items
  • Previous by thread: Tex-Edit, get wild text, even one letter.
  • Next by thread: File Sharing: time to draw folders
  • Index(es):
    • Date
    • Thread