Note: The value of the delay command may need to be adjusted for your system. Leaving out keystroke return from the code. To address the comment, I'd use the following instead of what you currently have: tell application "System Events"Ĭlick menu item "Export as PDF…" of menu 1 of menu bar item "File" of menu bar 1 of application process "Preview"Ĭlick button "Save" of sheet 1 of window 1 of application process "Preview" Note: Obviously under different versions of OS X/macOS "Export as PDF…" may be a different menu item number or that command may not exist in that form. 5 Foreign to PDF - Select this option for export the referenced document(s) as a multiple-paged PDF file(s). It needs to be "Export as PDF…" not "Export as PDF.", note that the first example has an actual ellipsis, not like in your code, the second example, three dots after PDF.Īlso, as an example in Preview under macOS 10.12.5 Sierra that I tested this under, you can also use: tell application "System Events" to tell process "Preview"Ĭlick menu item 14 of of menu 1 of menu bar item "File" of menu bar 1
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |