Why can’t KM tab through the Photoshop print setup menu?

I’m trying to automate changing the print setup menu in Photoshop. I can manually tab through the various menu items, but when I run a macro that types the tab keystroke, nothing happens.

Tabbing via a macro works in other Mac apps' print setup menu. The print setup menu called by Photoshop looks like the standard Mac print setup menu, so I don’t think it’s a special Adobe-programmed version. Or does Photoshop sometimes just not respond to Keyboard Maestro?

Thanks,
Russell

Adobe's main (the one that opens with ⌘P) print dialog is non-standard, the one you open from there with the "Print Setting..." button is standard but there's not a lot you can tab to!

Perhaps if you can explain what you are trying to set/change, someone will have a suggestion or two.

I want to automate selecting the media settings (paper type) when I print on various papers using my fancy Epson photo printer. I’ve saved the settings for Photoshop's non-standard menu by recording a Photoshop action, but it doesn’t pick up the Print Setup settings.

You select Print Setup in Photoshop's non-standard menu, click the middle pop-up that normally says "Layout," then select Printer Settings, then go to the Media Type pop-up and select a paper type.

Knowing no other way to do this, I’m "brute forcing" my way through the menus by tabbing, hitting arrow keys, etc. Maybe AppleScript could do something like this?

Thanks,
Russell

You'd have to use AppleScript UI scripting via System Events, which can be a) slow in execution, and b) a bear to set up.

In the meantime, KM's got image detection and clicking -- so it doesn't take long to set up something like what you'd do manually. You'll have to "personalise" the images to your system, but this should get you started -- starting in Photoshop and hitting the hotkey, for me it'll trigger the PS print dialog, open the OS print settings dialog, set the media type to "Labels", save that and leave me back at the PS print dialog:

PS Media Chooser.kmmacros (148.2 KB)

Summary

Change the hotkey to suit.

I've left long pauses so you can see it in action -- you can shorten them or, even better, change them to "Pause until" actions that wait for the next "view" to be ready (again using image detection). I can't remember if the OS dialog always starts with "Media Type" active, so have included a check-and-change for if it isn't.

As always, UI scripting can be a bit fragile -- so be prepared to tweak!

1 Like

As well as completely automating the procedure, using @Nige_S's Macro, I would also recommend saving your Epsom Settings in the standard Mac Print Dialog so, you can quickly call them back in one go when you need them, rather than having to set each element (paper size, quality, paper type etc).

I must admit that I find Photoshop's two stage printing dialogs very annoying. It's been like that for years. It is frustrating that you can't see all the settings in the first dialog and have to open up the second one to check them. The settings for each document do seem to be saved with that document. But as they can't be seen in Photoshop's print dialog, I'm always having to open both.

2 Likes

Actually, not as bad as I feared. There's a much longer delay before the "Print" dialog is accessed using this, so you may prefer a hybrid where you use a KM action to click the "Print Settings..." button then the AppleScript to set the media type (in which case delete the tell window "Photoshop Print Settings"... line). Set the first variable to the text of the pop up item you want to select and it should just work (unless Apple changed the dialog between OS versions -- another risk you take when UI scripting!).

PS Media Chooser AppleScript.kmmacros (4.8 KB)

Summary

Once you've saved your presets as @Zabobon has suggested you can change the AppleScript to manipulate the "Presets" menu instead.

2 Likes

Good idea. Maybe I could save the preset, then just automate select in that preset. Much easier than drilling down into the menu system each time!

Thanks!

2 Likes

This sounds like a good solution! I'll give it a try. Thanks for your help.

Regards,
Russell

I ended up making Print Settings presets (which hold the paper size and media type) and loading them with simple Keyboard Maestro macros based on Nige_S's PS Media Chooser macro. My macro first issues a keystroke that runs the Photoshop action setting the paper profile, rendering intent, color handling, etc., then it opens the Print Setup menu preset. Works great! Thanks to all.

1 Like