Re: UI Scripting of Acrobat Pro
Re: UI Scripting of Acrobat Pro
- Subject: Re: UI Scripting of Acrobat Pro
- From: Jan Bultereys <email@hidden>
- Date: Thu, 19 Jul 2007 12:18:46 +0200
- Thread-topic: UI Scripting of Acrobat Pro
Title: Re: UI Scripting of Acrobat Pro
Hi Rob,
Bill’s option should work to add a delay, i have added to close the file after the saving.
I hope this is the solution you are looking for.
tell application "Adobe Acrobat Professional"
activate
end tell
tell application "System Events"
tell process "Adobe Acrobat Professional"
tell menu bar 1
tell menu bar item "Comments"
tell menu 1
click menu item "Enable for Commenting in Adobe Reader..."
end tell
end tell
end tell
tell window "Save As"
click button "Save"
end tell
delay 1
tell window 1
click button "Replace"
end tell
end tell
delay 2
keystroke "w" using command down
end tell
From: Rob Stott <email@hidden>
Date: Thu, 19 Jul 2007 10:41:20 +0100
To: Applescript Mailing List <email@hidden>
Subject: UI Scripting of Acrobat Pro
Hi all,
I'm so close yet so far with a script! I'm trying to enable a pdf for commenting in Acrobat Reader. Sadly, I have to use UI Scripting for this (Yes, I know its not nice, but I can't see any other way!) and I'm running into problems.
I can do everything I need *except* click the 'replace' button in the final dialog box (to overwrite the old file). Can anyone suggest how to do this? Here's my script as it stands at the moment.
--running Acrobat 8 Pro
tell application "Adobe Acrobat Professional"
activate
end tell
tell application "System Events"
tell process "Adobe Acrobat Professional"
tell menu bar 1
tell menu bar item "Comments"
tell menu 1
click menu item "Enable for Commenting in Adobe Reader..."
end tell
end tell
end tell
--a save as dialog pops up, so we click the save button
tell window "Save As"
click button "Save"
end tell
--works fine up to here, where I want to click the 'Replace" button to overwrite the old file
tell window 1
click button "Replace"
end tell
end tell
end tell
...any suggestions and help much appreciated!
Thanks
Rob
Important: This message is intended only for the use of the individual or entity to which it is addressed and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient, or the employee or agent responsible for delivering the message to the intended recipient, you are hereby notified that any dissemination or copying of the communication is strictly prohibited. If you have received this communication in error, please notify the writer immediately by telephone and return the original message via postal service to the writer's attention at the above address. Thank you.
Watt Gilchrist Limited. Albion Mills, Albion Road. Bradford, BD10 9TQ
Registered in England
873405
_______________________________________________
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
_______________________________________________
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