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

What is command ID for Fit up to 100%?

Engaged ,
Sep 22, 2019 Sep 22, 2019

Copy link to clipboard

Copied

Hi everyone!

I use Kbar. So I want command id for Fit up to 100%.

Not short cut (shift + /), But command id.

Please help! Thank you!

 

Views

777

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

Advocate , Sep 22, 2019 Sep 22, 2019

I do not think there's a Menu Command for it. However, here's a snippet you can link to kBar button to do just that.

(function setMagnification() {
	var magnificationValue = 1;

	isRetina() && magnificationValue /= 2;
	app.activeViewer.views[0].options.zoom = magnificationValue;

	function isRetina() {
		var command, result;
		if (isMac()) {
			command = 'system_profiler SPDisplaysDataType | grep Resolution';
			result = system.callSystem(command);
			return /retina/i.test(result);
		}

		return
...

Votes

Translate

Translate
Advocate ,
Sep 22, 2019 Sep 22, 2019

Copy link to clipboard

Copied

I do not think there's a Menu Command for it. However, here's a snippet you can link to kBar button to do just that.

(function setMagnification() {
	var magnificationValue = 1;

	isRetina() && magnificationValue /= 2;
	app.activeViewer.views[0].options.zoom = magnificationValue;

	function isRetina() {
		var command, result;
		if (isMac()) {
			command = 'system_profiler SPDisplaysDataType | grep Resolution';
			result = system.callSystem(command);
			return /retina/i.test(result);
		}

		return false;
	}

	function isMac() {
		return $.os.indexOf('Mac') !== -1;
	}
})();

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
Engaged ,
Sep 22, 2019 Sep 22, 2019

Copy link to clipboard

Copied

Hey Tomas! 

I can set magnification!

I use your script, Roll it, Slice it up and Flow!

Very Very Helpful.

Thank you so much!

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
Advocate ,
Sep 22, 2019 Sep 22, 2019

Copy link to clipboard

Copied

LATEST
That cool! Thanks Kenji. I'm happy you find them usefull. Cheers.

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