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

Get current ratio of the crop tool.

Contributor ,
Jun 10, 2016 Jun 10, 2016

This is for part of another script that   c.pfaffenbichler has helped me with, I am looking to get to set the variables to the current ratio settings so that it can be default if my script doesn't fit any of the other rules.

TOPICS
Actions and scripting
525
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
Adobe
Community Expert ,
Jun 10, 2016 Jun 10, 2016

If you mean the current documents canvas aspect ratio that would be app.activedocument.width and  app.activedocument.height.

JJMack
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
Contributor ,
Jun 10, 2016 Jun 10, 2016

No not the canvas. Sorry I mean the last used ratio of the crop tool.

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
Community Expert ,
Jun 10, 2016 Jun 10, 2016

If the document name does not conform to one you know the aspect ratio to use why would you want to set the aspect ration that was last used?  That setting may have been set for some other project you were doing? When was the crop tool last used by you through Photoshop Crop UI?

In your script you could maintain a set of vars for last use Aspect Ratio I would set that it undefined to begin with  You could also record that into an external file which you can retrieve.

JJMack
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
Contributor ,
Jun 10, 2016 Jun 10, 2016

It was more to keep it like the default behaviour of photoshop that it selects the last used settings. Generally speaking the last used setting will likely to be used again.

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
Community Expert ,
Jun 10, 2016 Jun 10, 2016
LATEST

Even one used a week ago?

JJMack
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