Article View: adobe.scripting.indesign
Article #15308Re: VB.Net and InDesign CS different then InDesign 2.0
From: Olav_Kvern
Date: Mon, 08 Dec 2003 05:04
Date: Mon, 08 Dec 2003 05:04
25 lines
2202 bytes
2202 bytes
James-- Actually, the VBScript examples are quite a bit different from the VB examples of the same names that were in ID 2.x--most of them, for example, create their user interface using InDesign's Dialog object. The previous examples were all done as VB6 projects with VB forms. The logic of the examples has changed, and (of course) all of the terms have been updated (the examples show the change from TextContents to Contents, for example). VBScript will be the VB language type I use to deliver example scripts for InDesign from now on. VBScript is accessible, and users need have nothing other than Notepad to write the scripts, and VBScripts run faster from the Scripts palette. The only time I will create VB.NET/VB6 example projects is when I need to demonstrate something specific that can more easily be done there, such as some XML operations. In those cases, I'll be tempted to use VB6.<g> In any case, the VBScripts should be relatively easy to adapt to VB.NET, as the terminology of the InDesign object model is the same. Others may develop examples in whatever language they want, of course. By the way--I'd advise against using the prefix "id" for your variables, as it's used by InDesign's enums. Speaking of enums, one change from 2.x is that you need to specify the enum class, as well as the enum member, when you're using an enum. So what was: Rem 2.x example myParagraph.Justification = idLeftAlign should now be: Rem CS example myParagraph.Justification = idJustification.idLeftAlign Thanks, Ole
Technical Details
Message-ID:
<2ccec5cf.1@webx.la2eafNXanI>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!webxReferences:
<2ccec5cf.-1@webx.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f939a,28e19235f1e28fa8 X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2003-12-07 21:07:39 PST From: Olav_Kvern@adobeforums.com Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!webx Newsgroups: adobe.scripting.indesign Subject: Re: VB.Net and InDesign CS different then InDesign 2.0 Message-ID: <2ccec5cf.1@webx.la2eafNXanI> Date: Sun, 7 Dec 2003 21:04:58 -0800 References: <2ccec5cf.-1@webx.la2eafNXanI> Lines: 36 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit