Article View: adobe.scripting.indesign
Article #18857Re: Change Color Space (AS)
From: Kari Puikkonen
Date: Thu, 13 Feb 2003 18:00
Date: Thu, 13 Feb 2003 18:00
75 lines
2320 bytes
2320 bytes
A)
tell application "InDesign 2.0.2"
tell document 1
name of colors
end tell
end tell
Unfortunately this is not returning colors that is not in Swatches palette.
B)
Which script? What's not happening?
Forget this, I was wrong?
c)
I tried this kind of approach, but unfortunately InDesign crashes right away?
tell application "InDesign 2.0.2"
tell document 1
set myOldColor to my myFindColor(document 1, {0, 100, 15, 4})
set myNewColor to my myChangeColor(document 1, "Pantone Rubine Red C")
delete myOldColor replacing with myNewColor
end tell
end tell
on myFindColor(myDocument, myColorName)
tell application "InDesign 2.0.2"
tell myDocument
try
set myColors to colors whose color value is myColorName
repeat with myColor in myColors
if color value of myColor is myColorName then
return object reference of myColor
exit repeat
end if
end repeat
end try
end tell
end tell
end myFindColor
on myChangeColor(myDocument, myColorName)
tell application "InDesign 2.0.2"
tell myDocument
try
set myColors to colors whose name is myColorName
repeat with myColor in myColors
if name of myColor is myColorName then
return object reference of myColor
exit repeat
end if
end repeat
end try
end tell
end tell
end myChangeColor
Am I doing something illegal or is my script missing something?
Kari
Technical Details
Message-ID:
<1de7379f.4@WebX.la2eafNXanI>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!news.tele.dk!news.tele.dk!small.news.tele.dk!news.osn.de!newsfeed.freenet.de!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebXReferences:
<1de7379f.-1@WebX.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f939a,e7b787ca507c5117 X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2003-02-13 10:08:14 PST From: "Kari Puikkonen" <kari.puikkonen@welho.com> Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!news.tele.dk!news.tele.dk!small.news.tele.dk!news.osn.de!newsfeed.freenet.de!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebX Newsgroups: adobe.scripting.indesign Subject: Re: Change Color Space (AS) Message-ID: <1de7379f.4@WebX.la2eafNXanI> Date: Thu, 13 Feb 2003 10:00:39 -0800 References: <1de7379f.-1@WebX.la2eafNXanI> Lines: 67 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit