Article View: adobe.scripting.indesign
Article #19240Another Scripting Newbie
From: M Blackburn
Date: Fri, 27 Dec 2002 21:01
Date: Fri, 27 Dec 2002 21:01
53 lines
2969 bytes
2969 bytes
I have put feelers in here before, felt confounded, but am back. I am now using VB5 CCE, which is more comprehensible than VBA, but have read in here [Scripting Newbie] that it can't produce exe files that will run InDesign. Okay, first things first.
I have been going through the examples in the Scripting Guide and can generally follow what's going on, sorta. [Ole, pg. 9 first VB example, line 3. Isn't that missing a "= 0 Then" ? for it to work?
Real questions:
1 What does "Dim" mean?
2 Set myInDesign = CreateObject ("InDesign.Application.2.0") seems to be at the fore of every script. What does it do?
and here's the biggy :
This a script that I made a long time ago for PageMaker. I don't really remember what everything does, but it's goal is very simple, and it's the type of thing I want to be able to do in InDesign (for a start). Can I get some help converting it to InDesign?
-- dialogbegin -150, -50, 150, 50, "Alert"
-- pushbutton 220, 65, 280, 85, "Proceed"
-- pushbutton 145, 65, 205, 85, "Cancel"
-- static 15, 15, 285, 55, "This script will open and edit every text box and frame in the -- document. Do you wish to proceed?"
-- dialogend >> result
Suppressautosave on
-- Editstory
try ChangeAll ",1", "^<1", 2
try ChangeAll ",2", "^<2", 2
try ChangeAll ",3", "^<3", 2
try ChangeAll ",4", "^<4", 2
try ChangeAll ",5", "^<5", 2
try ChangeAll ",6", "^<6", 2
try ChangeAll ",7", "^<7", 2
try ChangeAll ",8", "^<8", 2
try ChangeAll ",9", "^<9", 2
try ChangeAll ",0", "^<0", 2
try ChangeAll ".1", ",1", 2
try ChangeAll ".2", ",2", 2
try ChangeAll ".3", ",3", 2
try ChangeAll ".4", ",4", 2
try ChangeAll ".5", ",5", 2
try ChangeAll ".6", ",6", 2
try ChangeAll ".7", ",7", 2
try ChangeAll ".8", ",8", 2
try ChangeAll ".9", ",9", 2
try ChangeAll ".0", ",0", 2
try ChangeAll "1%", "1^<%", 2
try ChangeAll "2%", "2^<%", 2
try ChangeAll "3%", "3^<%", 2
try ChangeAll "4%", "4^<%", 2
try ChangeAll "5%", "5^<%", 2
try ChangeAll "6%", "6^<%", 2
try ChangeAll "7%", "7^<%", 2
try ChangeAll "8%", "8^<%", 2
try ChangeAll "9%", "9^<%", 2
try ChangeAll "0%", "0^<%", 2
Suppressautosave off
-- CloseStory 1
PS I won't be using thin spaces though, they are much thinner in ID than they were in PM (�)
Technical Details
Message-ID:
<1de72635.-1@WebX.la2eafNXanI>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!newsfeed.news2me.com!newsfeed.icl.net!newsfeed.fjserv.net!proxad.net!newsfeed.tpinternet.pl!newsfeed01.sul.t-online.de!t-online.de!WebXShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: f939a,c9870728ff2b487a,start X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2002-12-27 13:11:30 PST From: "M Blackburn" <mblackburn@altamira.com> Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!newsfeed.news2me.com!newsfeed.icl.net!newsfeed.fjserv.net!proxad.net!newsfeed.tpinternet.pl!newsfeed01.sul.t-online.de!t-online.de!WebX Newsgroups: adobe.scripting.indesign Subject: Another Scripting Newbie Message-ID: <1de72635.-1@WebX.la2eafNXanI> Date: Fri, 27 Dec 2002 13:01:29 -0800 Lines: 64 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit