Help slug-O-matic format InDesignCS text box. Please, oh please...

I’ve managed to get a workable script that will set up a slug automatically, but I’m hoping somebody can help me
figure out some issues I need to solve.

Here’s the script:



--  slug-O-matic
--  Aaron Spesard 2005

property myString : {} as string
property LinkNames : {}


tell application "InDesign CS"
	
	set myDocument to active document
	tell myDocument
		set myFileName to (name of myDocument)
		set currentDate to current date
		set LinkNames to name of links
		set tempimagesUsed to ""
		log tempimagesUsed
		repeat with i from 1 to (count LinkNames)
			set tempimagesUsed to tempimagesUsed & (" ¢ " & item i of LinkNames) as string
		end repeat
		set imagesUsed to (characters 4 through -1 of tempimagesUsed)
		log imagesUsed
		
		
		set myString to "FILE NAME: " & tab & tab & myFileName & "
" & "DATE: " & tab & tab & currentDate & "
" & "IMAGES: " & tab & tab & imagesUsed
		set myPage to page 1 of myDocument
		tell myPage
			set mySlug to make text frame with properties {geometric bounds:{0.5, 0.5, (2 + 0.5), (6 + 0.5)}, font:"Helvetica", font style:"Regular", point size:8, contents:myString}
			set myColorBars to make rectangle with properties {geometric bounds:{0.5, 6.6, (0.5 + 0.5747), (5.6029 + 6.6)}}
			set myPlacedColorBars to place "05_raid4:z_SAVE:New_QC_Steps.eps" on myColorBars
		end tell
	end tell
end tell


  1. For some reason the text frame mySlug won’t take font style properties. Could some one tell me what I’m doing wrong?
  2. I’d like to fit frame to content after the frame has been set with text, how do I call this.
  3. And lastly, can someone tell me how to group these two items?

To everyone who has responded to ANY of my posts: Thank you!

:confused: Aaron

Make the text box, then set the style of the contents instead of trying to do it all in one line.

Duuuuuuuuuuuuuuude. You rock! One issue down… 2 to go. :smiley:

:confused: Aa

  1. fit rectangle mySlug given frame to content

  2. Not sure how to make a new group, since they have an ungroup command I would have though there would be an easy way to do this, it is probably done with the Make command and some parameters but my attempts based on syntax from Adobe’s documentations do not work.