Adobe 26001360 Scripting Guide - Page 50
In AppleScript, object is a placed image
UPC - 718659321840
View all Adobe 26001360 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 50 highlights
50 In AppleScript: --selection sorter tell application "Adobe Illustrator CS" set selectedObjects to selection try if selectedObjects is {} then display dialog "No objects are selected" else if class of selectedObjects = list and ¬ (count of items in selectedObjects > 1) then --selection contains more than one object. else --a single object is selected. What is it? set selectedObjectClass to class of selectedObjects if selectedObjectClass = list then ¬ set selectedObjectClass to class of item 1 of selectedObjects if selectedObjectClass = text then -- text is selected else -- determine what type of object is selected. if selectedObjectClass = path item then -- object is a path item else if selectedObjectClass = compound path item then -- object is a compound path else if selectedObjectClass = raster item then -- object is a raster image else if selectedObjectClass = placed item then -- object is a placed image else if selectedObjectClass = mesh item then -- object is a mesh else if selectedObjectClass = text frame item then -- object is a text frame item else if selectedObjectClass = plugin item then -- object is a plugin art item else if selectedObjectClass = path point then -- object is a point of a path else if selectedObjectClass = group item then -- object is a group end if end if end if end if on error errString display dialog errString end try end tell 12 Aug 03 Scripting Illustrator