• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Can't open pdf with Acrobat
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can't open pdf with Acrobat


  • Subject: Re: Can't open pdf with Acrobat
  • From: Brian Christmas <email@hidden>
  • Date: Fri, 05 Oct 2012 20:42:59 +1000


On 05/10/2012, at 7:36 PM, Christopher Stone <email@hidden> wrote:

On Oct 04, 2012, at 23:03, Brian Christmas <email@hidden> wrote:
I'm having trouble with the trial version of Acrobat Pro X.
set theItem to ((path to desktop) & "This is a test.pdf") as text as alias
tell application "Adobe Acrobat Pro"
open (theItem as alias)
end tell
______________________________________________________________________

Hey Brian,

I'm not certain why you're tying to make an alias file into an alias...

That aside I've seen some apps not liking aliases as file references.  I don't have Acrobat to test with, but I'd try file-path as «class furl» and see what happens.

--
Best Regards,
Chris


G'day Chris and Jan

Chris, out of desperation I tried as alias twice, and forgot to remove one before posting. However, neither posted method work.

I've resorted to a GUI method to open the files, but am trying now to open the header and footer panel, without success.

Regards

Santa


set theItem to ((path to desktop) & "This is a test.pdf") as text
set theitem2 to POSIX path of theItem
tell application "Adobe Acrobat Pro"
activate
tell application "Finder"
repeat until exists process "Acrobat"
delay 0.1
end repeat
end tell
delay 1
close all docs saving no
tell application "System Events" to tell process "Acrobat"
click menu item 1 of menu 1 of menu bar item 3 of menu bar 1
set x to 0
repeat while not (exists (window "Open"))
delay 0.1
set x to x + 1
if x ≥ 20 then exit repeat
end repeat
keystroke theitem2
click button "Go" of sheet 1 of window "Open"
click button "Open" of window "Open"
end tell


repeat until exists active doc
delay 0.1
end repeat
tell application "System Events" to tell process "Acrobat"
click menu item "Tools" of menu 1 of menu bar item "View" of menu bar 1
click menu item 1 of menu of menu item "Tools" of menu 1 of menu bar item "View" of menu bar 1
try
# this one works, opens the Tools panel
tell UI element 2 of group 1 of outline 1 of group 2 of group 1 of group 1 of group 1 of group 1 of group 1 of window 1
set {xPosition, yPosition} to position
set {xSize, ySize} to size
end tell
-- modify offsets if hot spot is not centered:
click at {xPosition + (xSize div 2), yPosition + (ySize div 2)}
delay 1
# this one doesn't work, trying to click the "Header & Footer" tool button
tell menu button "Header & Footer" of group 1 of group "Pages" of outline "Tools" of group 2 of group 1 of group 1 of group 1 of group 1 of group 1 of window 1
set {xPosition, yPosition} to position
set {xSize, ySize} to size
end tell
-- modify offsets if hot spot is not centered:
click at {xPosition + (xSize div 2), yPosition + (ySize div 2)}


end try
end tell
say active tool as text -- returns 'select'
try
say toolbar visibility as text
set active tool to "Tools" -- "Add Header & Footer…" --fails
on error errmsg
display dialog errmsg
end try


display dialog theItem as alias as text
--close all docs saving no
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

  • Follow-Ups:
    • Re: Can't open pdf with Acrobat
      • From: Christopher Stone <email@hidden>
References: 
 >Can't open pdf with Acrobat (From: Brian Christmas <email@hidden>)
 >Re: Can't open pdf with Acrobat (From: Christopher Stone <email@hidden>)

  • Prev by Date: Re: Can't open pdf with Acrobat
  • Next by Date: Re: Can't open pdf with Acrobat
  • Previous by thread: Re: Can't open pdf with Acrobat
  • Next by thread: Re: Can't open pdf with Acrobat
  • Index(es):
    • Date
    • Thread