Thread View: adobe.scripting.indesign
3 messages
3 total messages
Started by WellerUK_work
Tue, 20 Jan 2009 11:56
[JS] [CS3] Create pageItem in the View Centre
Author: WellerUK_work
Date: Tue, 20 Jan 2009 11:56
Date: Tue, 20 Jan 2009 11:56
29 lines
1876 bytes
1876 bytes
Hi I'm building script which adds new item into product catalogue based on the code from the prompt() dialog. When I run : App.activeDocument.rectangles.add() The new rectangle is created on the first page of the document. app.activeDocument.layoutWindows[0].activePage.rectangles.add() is better, but it always places the rectangle on the first page of the spread, which is not very helpful for the user who is zoomed into the opposite corner of the spread app.activeDocument.layoutWindows[0].activePage.rectangles.add().select(); app.cut(); app.paste(); does exactly what I want but is awfully slow, when I deal with complex object Is there a way to position page items in relation to the screen coordinates? Thanks for help weller
Re: [JS] [CS3] Create pageItem in the View Centre
Author: Peter Kahrel
Date: Tue, 20 Jan 2009 16:23
Date: Tue, 20 Jan 2009 16:23
6 lines
882 bytes
882 bytes
With a page item selected, setting the current layout window's zoom percentage to some value will centre the selection on the screen: app.activeDocument.layoutWindows[0].activePage.rectangles.add().select(); app.activeDocument.layoutWindows[0].zoomPercentage = 400; Peter
Re: [JS] [CS3] Create pageItem in the View Centre
Author: Harbs
Date: Tue, 20 Jan 2009 21:03
Date: Tue, 20 Jan 2009 21:03
12 lines
1007 bytes
1007 bytes
Hi Weller, If you're looking for hacks... Do exactly what you suggested, but make sure to do it only on the simple object like you did. Note the bounds of the object, and remove it. You then create your complex one using the bounds of the pasted object as a base position... -- Harbs http://www.in-tools.com
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