🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: adobe.scripting.indesign
5 messages
5 total messages Started by frekfeng Mon, 09 Mar 2009 09:30
How to get the insertionPoint at (x, y)?
#689
Author: frekfeng
Date: Mon, 09 Mar 2009 09:30
5 lines
883 bytes
Hi all:
   I want to insert a textfrme in another textframe, now I can get the coordinate: x value and y value, how can i get the inseriont ponit and insert a textframe at (x,y)?
   I don't want to use oPage.TextFrames.Add()
   I want to use oInsertionPoint.TextFrames.Add(), so I need to get the inseriont Point at (x,y)?
Thanks in advance.
Re: How to get the insertionPoint at (x, y)?
#690
Author: Peter Kahrel
Date: Mon, 09 Mar 2009 10:07
13 lines
862 bytes

      I want to use oInsertionPoint.TextFrames.Add(), so I need to get the inseriont
      Point at (x,y)?




Insertion points don't have coordinates (not really, anyway). What you have is already correct:

oInsertionPoint.TextFrames.Add()

Peter
Re: How to get the insertionPoint at (x, y)?
#634
Author: frekfeng
Date: Wed, 11 Mar 2009 00:22
2 lines
694 bytes
Hi:
 The problem is that I don't know how to get the insertion point at (x,y), I only know the coordinate.
Re: How to get the insertionPoint at (x, y)?
#635
Author: Dave_Saunders
Date: Wed, 11 Mar 2009 00:36
3 lines
630 bytes
How would you do it in the UI?

Dave
Re: How to get the insertionPoint at (x, y)?
#636
Author: Dave_Saunders
Date: Wed, 11 Mar 2009 00:38
5 lines
946 bytes
To take your request completely literally, you can measure the position of your current insertion point (by getting the horizontal offset and baseline), then move the containing text frame by the appropriate amount (x - x0, y - y0) where x0 and y0 are where the insertion point is before the move.

But I don't think that's quite what you want.

Dave
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads