Re: Two Acrobat Scripting Questions
Re: Two Acrobat Scripting Questions
- Subject: Re: Two Acrobat Scripting Questions
- From: Shane Stanley <email@hidden>
- Date: Thu, 18 Oct 2001 08:53:48 +1000
On 18/10/01 3:18 AM +1000, Steve Thompson, email@hidden, wrote:
>
In the Acrobat 5 dictionary, there is a command "Execute reference - the
>
menu item to execute"
>
>
However, this script
>
>
on open these_items
>
repeat with i from 1 to the count of these_items
>
set this_item to item i of these_items
>
set the item_info to info for this_item
>
if (folder of the item_info is false) and ,
>
(alias of the item_info is false) and ,
>
(the file type of the item_info contains "PDF") then
>
process_item(this_item)
>
end if
>
end repeat
>
end open
>
>
on process_item(this_item)
>
tell application "Acrobat 5.0"
>
activate
>
open this_item
>
execute "Rotate Clockwise"
>
save document this_item to file (this_item+".eps") using conversion 5
>
end tell
>
end process_item
>
>
>
Produces the message "Rotate Clockwise doesn't understand the execute
>
message". Anyone tell me the correct way to refer to a menu item in Acrobat
>
or where I might find it?
Probably:
execute menu item x of menu y
But you'd probably be better off looping through the pages and setting their
rotation:
tell application "Acrobat 5.0"
tell document docname
set pageCount to count each page
repeat with i from 1 to pageCount
set rotation of page i to 90
end repeat
end tell
end tell
>
>
Also, in the command Using Conversion, which conversion is "PostScript
>
File"? Every number I've tried (1- 8 so far) seems to save as anything but.
>
Any clues?
It's conversion 4. Are you doing an activate first? This works for me:
tell application "Acrobat 5.0"
activate
save document docname to "Macintosh HD:Test.ps" using conversion 4
end tell
--
Shane Stanley, email@hidden