I am currently running this script that “Selects All”, and then applies the effect “Outline Object”.
The issue is that sometimes an operator may re-open a file and this would result to re-applying the effect “Outline Object”.
Does anybody know if there is a way to detect what effects are presently applied in the Appearance Panel?
Unfortunately I did not see any mention of this in Illustrator’s scripting dictionary. And I do not want to clear all effects, because there may be something applied such as a drop shadow that needs to remain.
Any ideas?
tell application "System Events"
tell application process "Adobe Illustrator CS4"
set frontmost to true
keystroke "a" using {command down}
end tell
end tell
tell application "Adobe Illustrator"
try
set thisDoc to current document
--set theTexts to every text frame of thisDoc
--repeat with i in reverse of theTexts
--if locked of i then set locked of theTexts to false
--set selection to theTexts
tell application "System Events"
tell application process "Adobe Illustrator"
set frontmost to true
tell menu bar 1
tell menu bar item "Effect"
tell menu "Effect"
tell menu item "Path"
tell menu 1
click menu item "Outline Object"
end tell
end tell
end tell
end tell
end tell
end tell
end tell
--end repeat
end try
end tell
tell application "System Events"
tell application process "Adobe Illustrator CS4"
set frontmost to true
keystroke "a" using {command down, shift down}
end tell
end tell