• 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, select only HTML lines?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Tex-Edit, select only HTML lines?


  • Subject: Re: Tex-Edit, select only HTML lines?
  • From: "Marc K. Myers" <email@hidden>
  • Date: Sun, 02 Sep 2001 14:37:35 -0400
  • Organization: [very little]

> Date: Sun, 02 Sep 2001 07:30:18 -0600
> Subject: Tex-Edit, select only HTML lines?
> From: Rachel <email@hidden>
> To: AppleScript List <email@hidden>
>
> 1:
> I said: "if character 1 of line i is "<" then" and this works
> but "if word 1 of line i is "<a" does not work.
> and "if character 1 thru 2 of line i is "<a" does not work.
> so how do I select only lines starting with "<a href" ???
>
> 2:
> I said: "replace selection looking for ">^*<" replacing with "^*"
> replacing with styles {color:blue}"
> however I do not want to color the ">" and "<" characters. How do I select
> only the text between them?
>
> 3:
> I then said: replace selection looking for "<" replacing with "<"
> replacing with styles {color:black}
> but this does not work. How do I find a certain character in a selection?

1:
tell window 1 of application "Tex-Edit Plus"
repeat with i from 1 to (count lines)
set thisLine to line i
if thisLine starts with "<A HREF=" then
display dialog line i
end if
end repeat
end tell

2:
tell application "Tex-Edit Plus"
search window 1 looking for ">^*<"
if result is true then
select characters 2 thru -2 of the selection
end if
end tell

3:
This works for me. Are you sure you have the text selected when that
part of the script is run?

Marc K. Myers <email@hidden>
http://AppleScriptsToGo.com
4020 W.220th St.
Fairview Park, OH 44126
(440) 331-1074

[9/2/01 2:36:36 PM]


  • Follow-Ups:
    • Color HTML link labels.
      • From: Rachel <email@hidden>
  • Prev by Date: Re: Sort items in a list without OSAXen
  • Next by Date: Re: Sort items in a list without OSAXen
  • Previous by thread: Re: Finding & Fixing: Out of Memory Error? Solved!
  • Next by thread: Color HTML link labels.
  • Index(es):
    • Date
    • Thread