• 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: Requesting advice with Adobe Acrobat DC 2015, please.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Requesting advice with Adobe Acrobat DC 2015, please.


  • Subject: Re: Requesting advice with Adobe Acrobat DC 2015, please.
  • From: Yvan KOENIG <email@hidden>
  • Date: Fri, 10 Jul 2015 19:37:19 +0200

Hello

I made a bit of cleaning and now the script adjust itself to the language in use.


property theLargePagePrinter : "HP Officejet Pro 8610"

tell application "Finder" to set Print_loc to localized string "N167"
set All_loc to 1 --"All" / "Tout"
set Size_loc to 1 --"Size" / "Taille"
set ActualSize_loc to 2 --"Actual size" / "Taille réelle"
set ShrinkOversizedPages_loc to 3 -- "Shrink oversized pages" / "Réduire les pages hors format"


--tell application "Adobe Acrobat Reader DC" to activate

tell application "System Events" to tell process "AdobeReader"
set frontmost to true
--do shell script ("sleep 0.2")
try
keystroke "p" using command down
end try


repeat
if exists (first window whose subrole is "AXDialog" and name is Print_loc) then exit repeat
do shell script ("sleep 0.1")
end repeat


tell group 1 of window Print_loc
try
click pop up button 1
end try


repeat 20 times
do shell script ("sleep 0.1")
if exists menu 1 of pop up button 1 then exit repeat
end repeat


try
click menu item (my theLargePagePrinter) of menu 1 of pop up button 1
end try
--do shell script ("sleep 0.2")
end tell


try
click radio button All_loc of group 2 of window Print_loc
end try


tell group 3 of window Print_loc
try
click checkbox Size_loc
end try
do shell script ("sleep 0.2")
try
(*
try
say 1
say (exists (radio button ShrinkOversizedPages_loc)) as text --< "true"
end try


try
say 2
try
(get every attribute of radio button 3) as text -- Issue an error because the coercion can't be done
on error errMsg
set {oTIDs, AppleScript's text item delimiters} to {AppleScript's text item delimiters, {"{", "}"}}
set maybe to item 2 of (text items of errMsg)
set AppleScript's text item delimiters to oTIDs
end try
tell application "SystemUIServer" to display dialog maybe as text
say 3
end try
*)
if value of radio button 2 = 0 then
# The button is not selected.
# Probably an Adobe oddity, we must put the focus on it.
set value of attribute "AXFocused" of radio button 2 to true
# before clicking it
click radio button 2
(*
perform action "AXPress" of radio button 2 # Alternate syntax
*)
end if
end try
do shell script ("sleep 0.2")
end tell
-- < more code>
end tell
--end tell

#=====

I disabled several instructions which where useful for tests but are no longer needed.

Yvan KOENIG (VALLAURIS, France) vendredi 10 juillet 2015 19:37:13


 _______________________________________________
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: Requesting advice with Adobe Acrobat DC 2015, please.
      • From: Brian Christmas <email@hidden>
References: 
 >Requesting advice with Adobe Acrobat DC 2015, please. (From: Brian Christmas <email@hidden>)
 >Re: Requesting advice with Adobe Acrobat DC 2015, please. (From: Yvan KOENIG <email@hidden>)

  • Prev by Date: Re: Requesting advice with Adobe Acrobat DC 2015, please.
  • Next by Date: Re: Requesting advice with Adobe Acrobat DC 2015, please.
  • Previous by thread: Re: Requesting advice with Adobe Acrobat DC 2015, please.
  • Next by thread: Re: Requesting advice with Adobe Acrobat DC 2015, please.
  • Index(es):
    • Date
    • Thread