🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #18402

Re: Need Help with Using Labels in Script

#18402
From: Iolaire McFadden
Date: Fri, 21 Mar 2003 15:31
31 lines
1705 bytes
I'm only going to cover the if-then part of your question in vb and if-then statement is like this:

If test = check then
REM do something
Else
REM Do nothing or something else
REM also can do one or multiple tests within an if-then with:
REM Elseif newtest = newcheck then
End if

So the if then would be:

Set myInDesign = CreateObject("InDesign.Application.2.0")
Set myDocument = myInDesign.ActiveDocument
For myCounter = 1 To myDocument.AllPageItems.Count
Set myPageItem = myDocument.AllPageItems.Item(myCounter)
Select Case TypeName(myPageItem)
Case "TextFrame"
If Label = test
Then myPageItem.CornerEffect = idRoundedCorner
Rem Set the frame's corner effect
Rem (use one of the constants defined above)
Rem set the corner radius
myPageItem.CornerRadius = 12
else
REM else is optional if you don't have something else to do
end if
End Select
Next

iolaire
Technical Details
Message-ID: <1de8641e.2@WebX.la2eafNXanI>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-06!sn-xit-08!supernews.com!38.144.126.75.MISMATCH!feed1.newsreader.com!newsreader.com!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!nntp.infostrada.it!newsfeed01.sul.t-online.de!t-online.de!WebX
References: <1de8641e.-1@WebX.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f939a,498c886dd63b1cfe
X-Google-Attributes: gidf939a,public
X-Google-ArrivalTime: 2003-03-21 07:40:02 PST
From: "Iolaire McFadden" <imcfadden@costar.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-06!sn-xit-08!supernews.com!38.144.126.75.MISMATCH!feed1.newsreader.com!newsreader.com!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!nntp.infostrada.it!newsfeed01.sul.t-online.de!t-online.de!WebX
Newsgroups: adobe.scripting.indesign
Subject: Re: Need Help with Using Labels in Script
Message-ID: <1de8641e.2@WebX.la2eafNXanI>
Date: Fri, 21 Mar 2003 07:31:32 -0800
References: <1de8641e.-1@WebX.la2eafNXanI>
Lines: 32
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit