Trying to convert QXP Annotate script to work for InDesign
Trying to convert QXP Annotate script to work for InDesign
- Subject: Trying to convert QXP Annotate script to work for InDesign
- From: "Ripka, Herb" <email@hidden>
- Date: Wed, 16 Dec 2009 11:28:51 -0600
- Acceptlanguage: en-US
- Thread-topic: Trying to convert QXP Annotate script to work for InDesign
We are switching from Quark XPress to Adobe InDesign. We have a current AppleScript which works on QXP files, and which needs to be re-written to work on ID files.
The following AppleScript finds all picture windows on a layout and makes a textbox in the upper left hand corner with the linked picture name for that picture box, and the percentage that the linked picture is used at.
I am in the middle of the re-write. It compiles, and runs, but with no visible result. What am I missing?
Any help would definitely be appreciated.
--Herb Ripka
Greendale, WI
tell application "Adobe InDesign CS3"
set frames to ""
set myWindow to active window
activate
if (document 1 exists) then
tell document 1
tell myWindow
set zoom percentage to 100
end tell
set AppleScript's text item delimiters to ":"
repeat with p from 1 to count of pages
tell page p
repeat with i from 1 to count of frames
set filePath to (file path of image 1 of PICT frame) as Unicode text
if filePath is not "null" and filePath is not "no disk file" then
set fileName to text item -1 of filePath
tell PICT frame
set {sc1, sc2} to scale of image 1 as list
set {y1, x1} to origin of bounds as list
end tell
set y2 to ((y1 as real) + 14)
set x2 to ((x1 as real) + 185)
make text frame at beginning with properties {geometric bounds:{x1, y1, x2, y2}}
set fill color to "C=0 M=0 Y=100 K=0"
set label to "annotate" & i
tell story 1 of text box("annotate" & i)
set applied font to "Monaco"
set point size to 11
set contents to ("" & fileName & " " & (sc1 as text))
end tell
end if
end repeat --frames
end tell
end repeat --pages
set AppleScript's text item delimiters to {""}
end tell
display dialog "Done." buttons "OK" default button 1 with icon 1 giving up after 1
else
display dialog "Open a document, please." buttons "OK" default button 1 with icon 2
end if
end tell
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden