• 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 X: Web snapping colors
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Tex-Edit X: Web snapping colors


  • Subject: Re: Tex-Edit X: Web snapping colors
  • From: Gnarlodious <email@hidden>
  • Date: Fri, 22 Nov 2002 09:21:51 -0700

Muchas gracias to JJ, has and specially Kai for helping hammer this out.
Just what I wanted for my colorcoded Stylesheets!

--Hex triplet alfa must be Ucase
tell application "Tex-Edit"
tell front window
replace looking for "^*" replacing with "^*" replacing with styles
{color:my hexToRGB("#CC22AA")}
end tell
end tell

on hexToRGB(tx)
set {tid, tx, hx, rgb} to {text item delimiters, tx's text -6 thru -1,
"0123456789ABCDEF", {}}
repeat with n from 1 to 6 by 2
set text item delimiters to tx's character n
set {hi, text item delimiters} to {(hx's text item 1's length) *
4112, tx's character (n + 1)}
set {lo, text item delimiters} to {(hx's text item 1's length) *
257, tid}
set rgb's end to hi + lo
end repeat
return rgb
end hexToRGB
_______________________________________________
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.

  • Follow-Ups:
    • Re: Tex-Edit X: Web snapping colors
      • From: Kai Edwards <email@hidden>
References: 
 >Re: Tex-Edit X: Web snapping colors (From: Gnarlodious <email@hidden>)

  • Prev by Date: footprint in pdf
  • Next by Date: Re: Number of days left in the month
  • Previous by thread: Re: Tex-Edit X: Web snapping colors
  • Next by thread: Re: Tex-Edit X: Web snapping colors
  • Index(es):
    • Date
    • Thread