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

Forkjulle

macrumors regular
Original poster
Aug 1, 2012
211
1
See where it says "export"?

There is no keyboard shortcut. Is there a way that I can create a keyboard shortcut for it?
 

Attachments

  • Screen Shot 2015-08-15 at 10.45.04.png
    Screen Shot 2015-08-15 at 10.45.04.png
    145 KB · Views: 106

brookter1

macrumors regular
Aug 5, 2015
144
122
See where it says "export"?

There is no keyboard shortcut. Is there a way that I can create a keyboard shortcut for it?

If that's Preview you're using, then I've just spent 10 minutes trying it out and I can't get it work either, even using Apple's own documentation for shortcuts with 3 dots (which works fine in other programs...).

It seems like it may be a longstanding bug in Preview: https://discussions.apple.com/thread/3203931?start=15&tstart=0
 

Partron22

macrumors 68030
Apr 13, 2011
2,655
808
Yes
This AppleScript works to bring up Preview's export dialog:
Code:
tell application "Preview" to activate
delay 1
tell application "System Events"
    click menu item "Export…" of menu "File" of menu bar item "File" of menu bar 1 of application process "Preview"
end tell
Save it as an Automator script and assign your keyboard shortcut to that.
 

campyguy

macrumors 68040
Mar 21, 2014
3,413
957
FYI, it's not "3 dots/periods" - it's an ellipsis, inserted by pressing "Option-semicolon" on your keyboard. I got my tech writing degree in 1988, so that's how I knew what an ellipsis is - it represents an implied "there's more to follow"…

System Preferences > Keyboard > Shortcuts Tab > App Shortcuts item > click "+" > choose "Preview" from the Applications menu > type in the menu item exactly as you see it - Export… (or Export then Option-semicolon, with no spaces) > and type in your preferred Keyboard Shortcut > Press the Add button.

You're done - you don't even need to restart or log out.

Make sure you check for Command conflicts. Keep in mind that some applications don't work properly, like Firefox, which only responds to its own built-in commands - Shortcuts may show up but won't work and you'd need to resort to using your mouse or built-in command structure.

FYI, you can also use System Commands. I use "Command-P" in "All Applications" to invoke the Print Dialog, and while in that Print Dialog Box press my Keyboard Shortcut "Command-P" to invoke the "Save as PDF…" Command that's in the pull-down menu. So, you're not just limited to the visible commands.
 

Partron22

macrumors 68030
Apr 13, 2011
2,655
808
Yes
FYI, it's not "3 dots/periods" - it's an ellipsis, inserted by pressing "Option-semicolon" on your keyboard.
True, however AppleScript interpreter has trouble recognizing actual ellipses …, and converts three periods... into an ellipses when sending messages to a menu item.
Yes, that's odd, and I'm not sure which format "Keyboard Shortcuts" or "Services Preferences" takes, but if one form does not work, you'd best try the other as well.
 

campyguy

macrumors 68040
Mar 21, 2014
3,413
957
True, however AppleScript interpreter has trouble recognizing actual ellipses …, and converts three periods... into an ellipses when sending messages to a menu item.
Yes, that's odd, and I'm not sure which format "Keyboard Shortcuts" or "Services Preferences" takes, but if one form does not work, you'd best try the other as well.
A non-issue for me. I don't need Automator to accomplish this - and I've been using Apple's built-in editor since Tiger. No Automator required for this very simple edit - 90 seconds, done. QED.

Automator is overkill for what the OP wants to accomplish with the Preview app. I simply choose to use one of Apple's other tools to address this, and it's so much faster… And, if the app's developer - in this specific case, Apple, adheres to programming convention - and Preview does, then an ellipsis will work. I am being case- and post-specific, and I have used and don't shy away from Automator. Cheers!
 

brookter1

macrumors regular
Aug 5, 2015
144
122
And, if the app's developer - in this specific case, Apple, adheres to programming convention - and Preview does, then an ellipsis will work. I am being case- and post-specific, and I have used and don't shy away from Automator. Cheers!


It's a bug in Preview.

Try this:

a) Create a short cut in System Preferences under Preview for Export… (ellipsis).
b) Look in the Preview File menu -- no shortcut next to the Export… item.
c) Go back to System Preferences and recreate the identical menu item shortcut but this time in 'All Applications'. Copy and paste the name to be sure.
d) Look in the Preview File menu -- there's the shortcut.
e) Go back to System Preferences, delete it under All Applications, recreate under Preview
f) .... gone again

So there's a bug in Preview with application specific shortcuts. I posted a link to a discussion of this earlier on in the thread.
 

campyguy

macrumors 68040
Mar 21, 2014
3,413
957
It's a bug in Preview.

So there's a bug in Preview with application specific shortcuts. I posted a link to a discussion of this earlier on in the thread.
Odd, I have the "Control-Option-Command" shortcut assigned to that command on one of the Macs we use for managing printers and also a 2012 rMBP we use for field work. But both of those Macs were upgraded - not with a clean install - from Mavericks, when those tweaks were made. I tried it out on two Macs that were straight up with Yosemite - it seems as though some commands under the File Menu aren't editable under app-specific keyboard shortcuts. So, in that regard, my bad, and thanks for pointing that out…

Odd that those in that thread had issues in Mavericks and we didn't here…
 

brookter1

macrumors regular
Aug 5, 2015
144
122
No problem... It is very odd. Suspicion that it's to do with sandboxing -- did that come in after Mavericks?
 

campyguy

macrumors 68040
Mar 21, 2014
3,413
957
From what I've read and experienced, Yosemite was where the real sandboxing was put into effect, although the screws were being tightened in Mavericks. One that 2012 rMB and on mine, Firefox is installed and I use "Control-Z" to invoke the WIndow>Zoom command - it's in the "All Applications" Shortcuts option. It shows up in all applications on both rMBP and works for FF on my 2012 Mac but shows up and doesn't work on my Yosemite-only Mac - I have to navigate to/click on FF's Window>Zoom Command (with the ^Z right next to it). Grrr, that.

I use two displays that are attached to my rMBP and move windows between displays - the rMBPs and one each portrait and landscape, resizing windows with that command (and Control-Z for MS Office's "Zoom Window" command). Mavericks seems more "user friendly" with interface changes than Yosemite, and I haven't tried tweaking that OS yet.

Yeah, I share your suspicion there.
 

Partron22

macrumors 68030
Apr 13, 2011
2,655
808
Yes
Oh yes, sandboxing. The script I used, which I wrote yesterday on 10.10.4, works, but I have "Script Editor allowed to control Mac" checked under Security prefs. Likely, if the Script is saved as an App, you'll have to add it to the Security prefs allowed list as well.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.