🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #8886

Re: How to put a paragraph into a 1 by 1 table

#8886
From: Robert Tkaczyk
Date: Fri, 22 Sep 2006 08:34
51 lines
2692 bytes
> (1) What is the difference between Set and Let (which is what I'm familiar
> with from BASIC). Can I get rid of it, like you could with Let?

Let/Get is used when you want to write your own module

> (2) What is this constant: idNothingEnum.idNothing?

set nothing to variable

> (3) "Set myFoundItems = myDocument.Search()". This is a key line, because it
> collects all the paragraphs. But what kind of a variable is myFoundItems? An
> array? And how come you don't have to write something like this: FOR A  = 1
> TO 100: MYFOUNDITEMS (A) = MYDOCUMENT.SEARCH(A): NEXT

VisualBasic is different from "your" Basic ;)

> (4) Why do you have to state: MyFoundItem =
> myfounditems.Item(myCounter)...wouldn't it be enough to write myFoundItem =
> myFoundItems(myCounter) ?

yes ;) but xx.Item(y) looks better/clear ;)

> (5) I take it Item(-1) means start from the end. ie (-5) is five from the
> end, etc.?

yes

> (6) "Set myTable = myText.Item(1).ConvertToTable". This line really puzzles
> me. It doesn't seem to me to DO anything. It just creates a variable that
> contains a table containing myText. But where's the command to insert
> myTable into the document? You know, kind of like: LET MYDOCUMENT$ =
> MYDOCUMENT$ + MYTABLE...

it convert fouded item to table and set effect of conversion to variable 
;) 2 in 1 ;)

> Anyway, apologies for the complete beginner's questions. It seems like VB
> has come a long way since the days of my Commodore 64 BASIC ... and left me
> behind, I'm afraid.

I hope I helped you ;)

and look at this:
http://www.adobe.com/products/indesign/scripting.html

download both PDFs from bottom of page :)

robin

-- 
www.adobescripts.com
Technical Details
Message-ID: <61DDC1E1C501B287932B315BABC7C191@in.webcrossing.la2eafNXanI>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news.glorb.com!multikabel.net!feed20.multikabel.net!news.germany.com!news.isoc.lu!webcrossing
References: <58B49DDE8CFB764A53E11E78EDD2D04C@in.webcrossing.la2eafNXanI> <79CCC9B9F89D31DF2A5630D92B4640A0@in.webcrossing.la2eafNXanI> <67D5FBA8538635DBCDE2F80269117BBB@in.webcrossing.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,82604a7f44cea2dd
X-Google-Attributes: gidf939a,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: Robert Tkaczyk <indesignscripts@wp.pl>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news.glorb.com!multikabel.net!feed20.multikabel.net!news.germany.com!news.isoc.lu!webcrossing
Newsgroups: adobe.scripting.indesign
Subject: Re: How to put a paragraph into a 1 by 1 table
Message-ID: <61DDC1E1C501B287932B315BABC7C191@in.webcrossing.la2eafNXanI>
Date: Fri, 22 Sep 2006 01:34:16 -0700
References: <58B49DDE8CFB764A53E11E78EDD2D04C@in.webcrossing.la2eafNXanI> <79CCC9B9F89D31DF2A5630D92B4640A0@in.webcrossing.la2eafNXanI> <67D5FBA8538635DBCDE2F80269117BBB@in.webcrossing.la2eafNXanI>
Lines: 62
User-Agent: Thunderbird 1.5.0.7 (Windows/20060909)
X-Antivirus: avast! (VPS 0638-0, 2006-09-19), Outbound message
X-Antivirus-Status: Clean
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit