• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Keyboard command to select or scroll through to "optimized" in the Save As Jpeg dialog?

New Here ,
Feb 16, 2022 Feb 16, 2022

Copy link to clipboard

Copied

I typically use the Save as Jpeg "optimized" option, and I have to mouse over and click the radio button.  I've been researching ways to get that as the default option, rather than standard, but haven't found any.  I've also seen that on a PC one can use the tab or spacebar to scroll through radio buttons for a selection.  Tried that on my Imac and it doesn't work.  Is there something I'm missing?  I do this constantly, just trying to save a step. Thanks.  Julia

TOPICS
macOS

Views

156

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Feb 16, 2022 Feb 16, 2022

This version defaults the standard interface to use optimized and quality 10, providing flexibility to change values on the fly as needed (the previous script did not offer the ability to change quality or other values).

 

 

/*
Default JPEG Save to Optimized Standard.jsx
Based on:
https://community.adobe.com/t5/photoshop-ecosystem-discussions/save-as-jpeg-again/td-p/12650865
Stephen Marsh, 17th February 2022 - v1.0
Info: Uses the standard Photoshop interface with preset JPEG options, optimized &
...

Votes

Translate

Translate
Adobe
Community Expert ,
Feb 16, 2022 Feb 16, 2022

Copy link to clipboard

Copied

@juliaweddingphoto 

Scripting would be my answer (sort of possible in an action with pretty major limitations). I'll post a script later when I have time, I have a couple that made in other topics that just need the parameter changed.

 

/*
Custom JPEG Save As to Baseline Optimized.jsx
Based on:
https://community.adobe.com/t5/photoshop-ecosystem-ideas/option-to-disable-quot-jpeg-options-quot-pop-up-after-saving/idc-p/12662182
Stephen Marsh, 17th February 2022 v1.0
Info: Uses a custom prompt interface to *SAVE AS* with quality level 10 optimized/baseline JPEG to a user selected-folder
*/

#target photoshop

if (app.documents.length !== 0) {
	// Remove extension
	var docName = app.activeDocument.name.replace(/\.[^\.]+$/, '');
	var docNameInput = prompt('Enter a filename (without extension):', docName);
	// Remove extension
	var docNameOutput = docNameInput.replace(/\.[^\.]+$/, '');
	var docPath = Folder.selectDialog('Select a folder to save the JPEG image to...');

	// File Path & Naming
	var saveFileJPEG = new File(docPath + '/' + docNameOutput + '.jpg');

	if (saveFileJPEG.exists) {
		// true = 'No' as default active button
		if (!confirm("File exists, overwrite: Yes or No?", true))
			// throw alert("Script cancelled!");
			throw null;
	}

	jpegOptions(saveFileJPEG);

	// JPEG Options
	function jpegOptions(saveFileJPEG) {
		jpgSaveOptions = new JPEGSaveOptions();
		jpgSaveOptions.embedColorProfile = true;
		jpgSaveOptions.formatOptions = FormatOptions.OPTIMIZEDBASELINE;
		jpgSaveOptions.matte = MatteType.NONE;
		jpgSaveOptions.quality = 10;
		// Save as
		activeDocument.saveAs(saveFileJPEG, jpgSaveOptions, false, Extension.LOWERCASE);
	}

	app.beep();
	// alert('JPEG saved!');

} else {
	alert('You must have a document open!');
}

 

  1. Copy the code text to the clipboard
  2. Open a new blank file in a plain-text editor (not word-processor)
  3. Paste the code in
  4. Save the text file as .txt
  5. Rename the file extension from .txt to .jsx
  6. Install or browse  to the .jsx file to run

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 16, 2022 Feb 16, 2022

Copy link to clipboard

Copied

This version defaults the standard interface to use optimized and quality 10, providing flexibility to change values on the fly as needed (the previous script did not offer the ability to change quality or other values).

 

 

/*
Default JPEG Save to Optimized Standard.jsx
Based on:
https://community.adobe.com/t5/photoshop-ecosystem-discussions/save-as-jpeg-again/td-p/12650865
Stephen Marsh, 17th February 2022 - v1.0
Info: Uses the standard Photoshop interface with preset JPEG options, optimized & quality 10
*/

#target photoshop

if (app.documents.length > 0) {
    var docName = app.activeDocument.name.replace(/\.[^\.]+$/, '');
    try {
        // Use the previously saved path
        var docPath = app.activeDocument.path;
    } catch (e) {
        // If unsaved, select the desktop
        var docPath = "~/Desktop";
    }
    saveJPEG(10);
} else {
    alert("You must have a document open!");
}

function saveJPEG(compValue) {
	var s2t = function (s) {
		return app.stringIDToTypeID(s);
	};
	var AD = new ActionDescriptor();
	var AD = new ActionDescriptor();
	AD.putInteger( s2t( "extendedQuality" ), compValue );
	AD.putBoolean( s2t( "optimized" ), true ); // true for optimized / false for standard
	AD.putEnumerated( s2t( "matteColor" ), s2t( "matteColor" ), s2t( "none" ));
	AD.putObject( s2t( "as" ), s2t( "JPEG" ), AD );
	AD.putPath( s2t( "in" ), new File(docPath + "/" + docName + ".jpg"));
	AD.putInteger( s2t( "documentID" ), 320 );
	AD.putBoolean( s2t( "copy" ), true ); // true for copy
	AD.putBoolean( s2t( "lowerCase" ), true );
	AD.putEnumerated( s2t( "saveStage" ), s2t( "saveStageType" ), s2t( "saveSucceeded" ));
	executeAction( s2t( "save" ), AD, DialogModes.ALL );
}

 

 

jpg.png

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 17, 2022 Feb 17, 2022

Copy link to clipboard

Copied

Stephen,

Thank you for this, but I think it may be over my head? Are you saying if I follow the above instructions, it will default to optimized?   I was hoping there would be a keyboard command to scroll through the options...easier to wrap my head around.  Sorry I'm a technophobe!  J

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 17, 2022 Feb 17, 2022

Copy link to clipboard

Copied

LATEST

Yes, when run, the second script will default the JPEG save dialog to optimised quality level 10. You can change the settings on the fly as required. A different quality level can easily be set as default if you don't like 10.

 

The first script doesn't use the default interface, it only offers naming and save location prompts without the ability to change settings.

 

This is my solution as I can't offer what you ask.

 

You would run the script from menu, keyboard shortcut or action to replace the standard save steps. This does not change how Photoshop is programmed when using the standard save, you need to use the script.

 

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines