Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Using Applescript on Mac, opening the Page Setup window is STAGGERINGLY slow to be recognised.

New Here ,
Feb 24, 2016 Feb 24, 2016

This is a general feedback on using Acrobat CC with Mac

We process many, many pdf documents each day, using Applescript Objective C code app to print each pdf to 100% accuracy.

A major holdup is that in our time-sensitive process, opening the Print, Page Set window takes about 6 whole seconds to be recognised. The Page Setup window pops open very quickly, the script just takes forever to 'see' it.

Can this be fixed on future releases, please?

Regards

Brian Christmas

property theLargePagePrinter : "Large Page Printer"

property largePaperSize : "A4"

set c to current date

tell application "Adobe Acrobat" to activate

tell application "System Events" to tell process "AdobeAcrobat"

  try

  do shell script ("sleep 0.2")

  set x to 0

  keystroke "p" using command down

  repeat until exists window "Print"

  set x to x + 1

  if x > 120 then

  exit repeat

  end if

  do shell script ("sleep 0.1")

  end repeat

  end try

  click button 1 of window "Print"

  try

  set x to 0

  # This is a major holdup.

  # Even without the loop, this window takes 6 seconds to be recognized

  repeat until exists window "Page Setup"

  set x to x + 1

  if x > 120 then

  exit repeat

  end if

  do shell script ("sleep 0.1")

  end repeat

  end try

  click pop up button 2 of window "Page Setup"

  try

  click menu item (my theLargePagePrinter) of menu 1 of pop up button 2 of window "Page Setup"

  end try

  try

  click pop up button 3 of window "Page Setup"

  end try

  try

  click menu item (my largePaperSize) of menu 1 of pop up button 3 of window "Page Setup"

  end try

  try

  click menu item (my largePaperSize) of menu 1 of menu item (my largePaperSize) of menu 1 of pop up button 3 of window "Page Setup"

  end try

  keystroke return

end tell

say (current date) - c as text


TOPICS
Acrobat SDK and JavaScript
498
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
no replies

Have something to add?

Join the conversation