Click at Found Image for multiple users

I am trying to click on found image "Format" in Preview so I can ensure format selected is always PDF - see pic but macro has to run on other machines as well.

The action Move & Click from Found Image works on my machine but testing on another machine action
KT Save Sketch Latest.kmmacros (13.5 KB)
fails. Have tried Pause till Image is Found but that does not work.

Any suggestions appreciated.

Screen Shot 2021-08-16 at 16.40.51

Hey Michael,

Different machines with different resolutions and perhaps different versions of macOS will not respond to the same image.

You'd have to take the image on each individual machine, and that's a big hassle.

But – you should be able to do something like this with a minimal amount of tweaking.

-Chris

--------------------------------------------------------
# Auth: Christopher Stone
# dCre: 2021/08/16 11:24
# dMod: 2021/08/16 11:24 
# Appl: Preview, System Events
# Task: Select PDF Outlput in Save As Dialog.
# Libs: None
# Osax: None
# Tags: @Applescript, @Script, @Preview, @System_Events, @Save-As, @PDF
--------------------------------------------------------

tell application "System Events"
   tell application process "Preview"
      tell (first window whose subrole is "AXStandardWindow")
         tell sheet 1
            tell pop up button 2
               if value ≠ "PDF" then
                  perform action "AXPress"
                  tell its menu 1
                     tell menu item "PDF"
                        perform action "AXPress"
                     end tell
                  end tell
               end if
            end tell
         end tell
      end tell
   end tell
end tell

--------------------------------------------------------

Thank you Chris and apologies. Got stuck looking at problem one way. Export as PDF solved the issue and much easier. But will grab macro you kindly supplied and see if I can understand that as may be useful for later.

All the best

Michael

1 Like