This is my first time trying to write an applescript for adobe illustrator so I am trying something simple. All I want to do is do a select all create outlines. But I need an if statement such as if there are locked items do this if there are no locked items do this.
tell application “adobe illustrator”
If items are locked then unlock all (command option 2) then
select all
else
select all
end if
create outlines (command shift O)
end tell
Unfortunately I don’t have Illustrator to test this but based on Illustrator’s dictionary, found right here at MacScripter, I think the following may get you closer. I am unsure on how to select all.
tell application "adobe illustrator"
set selection of every text art item to true
--or
set selected of every text art item to true
--or using Sandi's addition
tyoetext "a"
convert to paths selected items
--or
convert to paths selection
--or using Sandi's addition
typetext "o" with command and shift
end tell
Again, I don’t have Illustrator to confirm this. Hope it helps anyway