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

What is command ID for Fit up to 100%?

Engaged ,
Sep 22, 2019 Sep 22, 2019

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!

 

1.1K
Translate
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
...
Translate
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 false;
	}

	function isMac() {
		return $.os.indexOf('Mac') !== -1;
	}
})();
Translate
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

Hey Tomas! 

I can set magnification!

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

Very Very Helpful.

Thank you so much!

Translate
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
LATEST
That cool! Thanks Kenji. I'm happy you find them usefull. Cheers.
Translate
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