Bypassing dialog in Illustrator actions

Not quite what we’re looking for.

It still displays “___________ is not available” dialog.

__________ being replaced with whatever thing the action is trying to currently perform. (i.e. convert text to paths)

If the text is already paths, then it pops up saying that paths are not available (paraphrase).

Thanks though.

So far the closest we’ve come has been almost entirely through UI scripting. However, I don’t know how to reference the menu items for ‘fly out’ menus such as brushes or swatches (to delete all unused brushes and swatches).

Thanks.

Put simply - you can’t. I’ve never seen a way to access those fly-out submenus programatically.

Another example approach to consider: If there are no items locked, the unlock command will fail. Solution? Select either an object or even everything and lock it, then unlock all. Seems like the long way around but it guarantees that something in the file will be locked to make the unlock command happy when it’s called.

That sound like a great idea. Ghetto, but great. I bet that’ll work perfectly.

But what do you do about converting type to paths? You can’t just make type NOT be paths, in order to allow the action to then create paths.

thePunch,

This is what I came up with for converting text to paths.

set textList to {}
tell application "Adobe Illustrator 10"
	activate
	--try
	set textCount to count every text art item of current document
	repeat with i from 1 to textCount
		set selection to convert to paths first text art item of current document
	end repeat
	--on error
	--display dialog "There appears to be no text in current document" giving up after 2
	--end try
end tell

I had put the try statement in but found it unnecessary because if there were no text art items it would return 0 for the count and the repeat, of course, would not do anything.

PreTech