Illustrator Stroke Weights. (Unrelated to Past Post)

No problem. It was a worthwhile script. I’m always willing to spend time on an idea I can use.

Just for fun,

This will allow you to increase the stroke width of text no matter how it is selected. It will probably be slow if the selection is in a large text item.

tell application "Illustrator CS"
	activate
	set thisDoc to current document
	set theSelected to every text frame of thisDoc whose selected is true
	repeat with anItem in theSelected
		set tLength to length of text range of anItem
		set theChars to text range of anItem
		set selChars to every character of selection of anItem
		set numSelChars to (count selChars)
		repeat with i from 1 to tLength
			set aChar to character i of anItem
			repeat with k from 1 to numSelChars
				set selChar to item k of selChars
				if aChar is selChar then
					if class of stroke color of character i of anItem is not (no color info) then
						tell character i of anItem to set stroke weight to stroke weight + 0.5
					end if
				end if
			end repeat
		end repeat
	end repeat
end tell

There may be a more elegant way of accomplishing this and if you know how I’d like to see how it’s done, but this is the way I figured it out.

PreTech