Illustrator--Check & Change Font Size

Hi All

I am using Illustrator 10. I want a script which can check “if font size is 10 then change font size to 9”.

Thanks

Hi Macrajeev

Not sure if you’ve found the answer to this one yet…
But something like this could help.

tell application "Illustrator CS"
	activate
	make new document
	set thisdoc to current document
	set h to height of thisdoc
	set w to width of thisdoc
	tell thisdoc
		--set x to name of swatch 6
		set the zoom of current view to 0.9
		set thistext to make new text frame
		tell thistext
			set the contents to "Hi i'm 10 point text"
			set position to {50, h - 50}
			tell paragraph 1
				set the size to 10
			end tell
		end tell
		set moretext to make new text frame
		tell moretext
			set the contents to "Hi i'm 10 point text"
			set position to {100, h - 100}
			tell paragraph 1
				set the size to 10
			end tell
		end tell
		delay 2
		tell thistext
			tell paragraph 1
				if the size = 10 then
					set the size to 9
					set the contents to "Hi i'm no longer 10 point text i'm now 9 point"
				end if
			end tell
		end tell
	end tell
end tell

sorry its abit long winded i was just tinkering with some illustrator settings

Here’s a shorter one:


tell application "Adobe Illustrator"
	tell current document
		tell every text frame
			tell (every word whose size is 10)
				set size to 9
			end tell
		end tell
	end tell
end tell

It’s slow as a dog under rosetta; maybe it’ll be faster for you.