πŸš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #17250

Re: AS New frame code

#17250
From: roberto soto
Date: Fri, 20 Jun 2003 13:40
43 lines
2190 bytes
Hi Roy,

From the UI the frame break is SHIFT + NUM ENTER, (special key), with NUM ENTER Microsoft got different kind of problems documented (http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/KB/ARTICLES/Q188/5/50.asp&NoWebContent=1)

So the sendkeys command for me donοΏ½t work in this case so I just change InDesign shortcuts preferences for this specific and every think is ok.

Go to Edit-Keyboard Shortcuts and set new for
Product Area: Type Menu
Commands: Insert Break Character : Frame Break
New Shortcut: Shift+Alt+A
Context: Text

After you can run this code:

Set myInDesign = CreateObject("InDesign.Application.2.0")
    Set myDocument = myInDesign.ActiveDocument
    Set myPage = myDocument.Pages.Item(1)

Set myTextFrame = myPage.TextFrames.Add
    myTextFrame.GeometricBounds = Array("10p", "10p", "25p", "25p")

Set myTextFrame2 = myPage.TextFrames.Add
    myTextFrame2.GeometricBounds = Array("30p", "10p", "45p", "25p")

myTextFrame.NextTextFrame = myTextFrame2

myFirstText = "Hello, abcde"
    mysecondtext = "World, fghijk"

Set myPoint = myTextFrame.ParentStory.InsertionPoints

myPoint.Item(myPoint.Count).TextContents = myFirstText

myLastPoint = myPoint.Count

myInDesign.Select myTextFrame.InsertionPoints.Item(myLastPoint)

Shell "C:\Program Files\Adobe\InDesign 2.0\InDesign", vbNormalFocus
    SendKeys "+%a"

myPoint.Item(myPoint.Count).TextContents = mysecondtext

Roberto
Technical Details
Message-ID: <1de99817.2@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.freenet.de!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebX
References: <1de99817.-1@WebX.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: f939a,4007a5620b90555c
X-Google-Attributes: gidf939a,public
X-Google-ArrivalTime: 2003-06-20 07:08:36 PST
From: "roberto soto" <roberto1soto@hotmail.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.freenet.de!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebX
Newsgroups: adobe.scripting.indesign
Subject: Re: AS New frame code
Message-ID: <1de99817.2@WebX.la2eafNXanI>
Date: Fri, 20 Jun 2003 06:40:41 -0700
References: <1de99817.-1@WebX.la2eafNXanI>
Lines: 48
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit