Current position: Home > Default > Setting myMasterSpread
Setting myMasterSpread
What I am trying to do is write a script that will put two text boxes in the upper right corner of my master spread so it reads "last modified: modification date". I have tried tons of different commands/word combinations but I keep getting an error in trying to set myMasterSpread. What I have so far is:
tell application "Adobe InDesign CS5.5"
set myDocument to document
set myMasterSpread to masterspread("A-Master") of myDocument
set myLeftPage to page 1 of myMasterSpread
set myRightPage to page 2 of myMasterSpread
tell myRightPage
set myRightHeader to make text frame
set geometric bounds of myRightFooter to {-19, 963, -15, 1108}
set first baseline offset of text frame preferences of myRightHeader to leading
offset
set contents of myRightHeader to "last modified:"
set point size of character 1 of parent story of myRightFooter to 10
set justification of character 1 of myRightHeader to left align
end tell
tell myRightPage
set myRightHeader to make text frame
set geometric bounds of myRightFooter to {-29, 1010, -15, 1146}
set first baseline offset of text frame preferences of myRightHeader to leading
offset
set contents of myRightHeader to modification date
set point size of character 1 of parent story of myRightFooter to 10
set justification of character 1 of myRightHeader to left align
end tell
end tell
Can someone please help me figure this out??
Thanks!
tell application "Adobe InDesign CS5.5"
set myDocument to document
set myMasterSpread to masterspread1 of myDocument
set myLeftPage to page 1 of myMasterSpread
set myRightPage to page 2 of myMasterSpread
tell myRightPage
set myRightHeader to make text frame
set geometric bounds of myRightHeader to {-19, 963, -15, 1108}
set first baseline offset of text frame preferences of myRightHeader to leading
offset
set contents of myRightHeader to "last modified:"
set point size of character 1 of parent story of myRightHeader to 10
set justification of character 1 of myRightHeader to left align
end tell
tell myRightPage
set myRightHeader to make text frame
set geometric bounds of myRightHeader to {-29, 1010, -15, 1146}
set first baseline offset of text frame preferences of myRightHeader to leading
offset
set contents of myRightHeader to modification date
set point size of character 1 of parent story of myRightHeader to 10
set justification of character 1 of myRightHeader to left align
end tell
end tell
and i get the error# -1728 error string: can't get masterspread1 of document...
- Read related articles
- Open up "Save As" dialog in javascript
- Batch renaming and relinking in InDesign CS4
- Add cover sheet without affecting existing page numbering?
- Make masterpage items in indesign....
- BridgeTalk troubles
- [CS4/JS] get guide position using script label
- Folder selection
- [JS][CS5] resize document
-
Open up "Save As" dialog in javascript
2015-10-11Hello all, I am a newbie to scripting and to be honest it makes my head hurt lol, Kudos to all that make this look easy. I found some good resources but following everything is going to take a bit. I have am using the object model viewer and its
-
Batch renaming and relinking in InDesign CS4
2015-10-11Is there a plug-in available for InDesign that will batch rename and relink placed images? In Quark, I used Badia Link Renamer which worked perfectly but it's not available for InDesign. (Was told they hope to have it incorporated into BigPicture for
-
Add cover sheet without affecting existing page numbering?
2015-10-11I guess the lack of response means either that my question is inappropriate in some way or else it's difficult or impossible to answer! Thanks for letting me post it anyway! This seems to be a very informative site (just figured out how to access it
-
Make masterpage items in indesign....
-0001-11-30How can I get my automatic design on the master page? set Vbreedte to (text returned of (display dialog "width?" default answer "")) as string set Vhoogte to (text returned of (display dialog "Height?" default answer "&q
-
BridgeTalk troubles
-0001-11-30I am trying to run an InDesign scirpt from Photoshop using a BridgeTalk example from Paul Riggott. The InDesign part works in ESTK with InDesign as the target but not as part of a Photoshop script through BridgeTalk. So I have some questions. 1. What
-
[CS4/JS] get guide position using script label
-0001-11-30Hello Scripters, I am trying to get the position of some specific guides of my masterspread, the following code snippet doesnt work: var myMasterSpread = myDocument.masterSpreads.itemByName("A-Master"); var myX1 = myMasterSpread.guides
-
Folder selection
-0001-11-30Hi all, I've got a script to set up a document and import a folder of files to it. I've got a couple of questions about the UI dialogs, now! 1) I'm using the Folder.selectDialog() function to choose the folder where the images are. I'd really like to
-
[JS][CS5] resize document
-0001-11-30Hi Part of a script I am writing resized the active doc to the width and height of the selected frame. However, I cannot seem to get InDesign to reduce the page size to anything leaas that 20.5mm. There are no guides set, there is nothing on the mas

Hots 
- 1HT201272 All my books disappeared when I bought a new computer and the download previous purchases doesn't work. Any suggestions will be appreciated. 10-11
- 2Upgrading from TCS 2.0 to TCS v. 2.5 - Know What You're Getting!!! 10-11
- 3Mobile Sync Client does not save password properly 10-11
- 4Tax invoice not show in assignment field of billing doc & ref doc of FI doc 10-11
- 5Illustrator cs4 and photoshop cs4 animation files 10-11
- 6How can I get my contacts on my iphone 3g from icloud 11-30
- 7Black Screen on switch to tty after install proprietary catalyst-hook 11-30
- 8HT4906 Why do I have to update and pay money to use iCloud on my mac????? 11-30
- 9How do I use resource or release resource based on boolean? 11-30

News 
- Whenever I use a search engine, I keep getting the error message "The connection was reset while the page was loading".10/11
- Error 1935 - Adobe Reader (11) - An error occurred during the installation of assembly component - Windows 710/11
- Calendar events created in iPhone don't sycn to iCal10/11
- Using Fiscal Year in RPM 4.511/30
- I have an error message even after reinstalling itunes...11/30
- Entity EJB Relationships Architectural Question11/30
- Can I get the audio wave form to show in the Timeline?11/30
- Backing up pictures on an external hardrive?????11/30
- Oracle bitand function11/30
- PXI: Continuous loops necessary?11/30