Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

JadeM

macrumors newbie
Original poster
Oct 30, 2017
1
0
How do you add a shortcut to a more complicated instruction?

(Example shown in the image)
2nq5y0p.png


When I have to export lots of pages files at once into PDF files, it becomes tedious and I want to make it a quicker process, so when you press File > Export To > PDF it isn't allowing me to make a shortcut for it since the instruction involves multiple steps as opposed to File > Save As... (which has one arrow)

Sorry it's a bit difficult to explain. Hope the images help
 

organicCPU

macrumors 6502a
Aug 8, 2016
832
289
Usually it should work like this... maybe for you, too.
Go to System Preferences > Keyboard > Shortcuts > App Shortcuts
Press the +-Sign
Choose from Applications pop-up menu: "Pages"
Enter in Menu Title field exactly the menu item you want to assign a shortcut to:
Code:
File->Export To->PDF…
Klick into Keyboard Shortcut field and press a key combination that is not assigned, yet. (Like Command+Option+Ctrl+P)

So far the theory. In Mac OS X 10.8. this is working really well, but I've found that there seems to be a problem in macOS Sierra with just all of the menu items I tried that contain the three dots (...) in their name. I've tried to enter them as the single …-sign or as three separate period signs with no avail. Even tried to add or remove extra whitespace or leave the dots away. If someone else is also having this problem, doesn't have the problem or has the solution, please post it.

Nevertheless, this thread for automated export of PDFs from Pages could also be of interest for you.
 

organicCPU

macrumors 6502a
Aug 8, 2016
832
289
For menu items setting up the shortcut like described above isn't working, one could assign an Automator Service.

- open Automator > File > New > Service > Choose
- Service receives: "no input" in "Pages" (Klick drop-down menu, choose Other…, select Pages)
- choose and insert action from Actions Library > Utilities > Run AppleScript
- copy and paste AppleScript like this:
Code:
on run
    tell application "System Events" to tell process "Pages"
        tell menu item "Export To" of menu 1 of menu bar item "File" of menu bar 1
            click menu item 1 of menu 1
        end tell
    end tell
end run
- select File Save…
- give it a meaningful name like "Pages_exportPDF"
- the Service is automatically stored in ~/Library/Services

- navigate to System Preferences > Keyboard > Services
- search for your new service "Pages_exportPDF" somewhere at the bottom
- assign a shortcut to the service like "Command+Option+Ctrl+P"

- navigate to System Preferences > Security > Privacy
- select Accessibility, press the +-sign, add "Pages" to be allowed to control your Mac (activate select button)

Now you can access File->Export To->PDF… by pressing your shortcut (e.g. "Command+Option+Ctrl+P")
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.