การใช้ applescript เพื่อเปลี่ยนน้ำหนักเส้นโครงร่างตามเงื่อนไขใน Illustrator CS6

ฉันพยายามใช้รหัสนี้

tell application "Adobe Illustrator"
    tell front document
        set properties of every path item whose stroke weight is less than 0.2 to {stroke width:0.2}
    end tell
end tell

ฉันไม่เห็นเหตุผลว่าทำไมมันถึงใช้งานไม่ได้ แต่มันติดอยู่กับวลี "รายการเส้นทาง" ฉันไม่เข้าใจว่าฉันต้องทำอะไรอีก! ฉันกำลังพยายามทำให้สิ่งนี้ทำงานใน Illustrator CS6


person Patrick Hennessey    schedule 25.09.2014    source แหล่งที่มา


คำตอบ (1)


การเปิดเผยข้อมูลทั้งหมด: ฉันกำลังทำสิ่งนี้กับ CS4 แต่จริงๆ แล้วควรจะเหมือนเดิม แม้ว่าฉันคิดว่าเป็นไปได้ (ไม่น่าเป็นไปได้) ที่ "ความกว้างของเส้นขีด" เปลี่ยนเป็น "น้ำหนักของเส้นขีด" ฉันคิดว่าคุณต้องระบุเลเยอร์ด้วย ลองทำสิ่งนี้ (แน่นอนคุณจะต้องระบุเลเยอร์ที่ถูกต้อง) มันได้ผลสำหรับฉัน:

tell application "Adobe Illustrator"
    tell front document
        set stroke width of (every path item of layer 1 of it whose stroke width is less than 0.2) to 0.2
    end tell
end tell
person CRGreen    schedule 26.09.2014