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

As in the script to include a non-linear history

Explorer ,
Aug 08, 2018 Aug 08, 2018

Hello dears!

The question in the topic title. How can the script first to include a non-linear history, and then disable?

It is necessary that it was done not manually in the history options palette, but in the script.

Thanks in advance

TOPICS
Actions and scripting
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

LEGEND , Aug 08, 2018 Aug 08, 2018

I tried it by Action Manager, but couldn't figure out why it doesn't work. I assume it has as you can do the same by DOM as JJMack mentioned: preferences.nonLinearHistory = true. Possibly someone will be smarter to use Action Manager for it.

Translate
Adobe
Community Expert ,
Aug 08, 2018 Aug 08, 2018

A script I believe can  use Photoshop  history states note history state  delete Photoshop history states or some history states revert to a history state  and suspend recording history states.  I have no ideas what you mean by "include a non-linear history".

There is a reference to a nonLinearHistory boolean its Read-write on page160 of the Adobe JavaScript reference has something to do with preferences.  You can set preferences in a scripts so you can set it to true and false its Read-write. I just do not know what a non Linear History means.

Edit:

I started reading working with nonlinear history but stopped does not seem to be something I would find useful or want to do.  I would more likely change my mind later and re-do the process anyway.

Working with nonlinear histories | Introduction to Using Adobe Photoshop CS4 | Peachpit 

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
Explorer ,
Aug 08, 2018 Aug 08, 2018

I apologize for my poor English. I meant setting a tick for this mode in the history palette. Unfortunately, I'm not good at scripts. So I could not figure out that it is done in one line.

The problem itself was as follows. There is a script that performs a number of actions. In the process of his work formed snapshots. And there is a return to them at different stages of the script. It is necessary to keep the entire history before the script starts. And in the process of the script history did not work. But since there are returns to the snapshots, the whole previous story was deleted. And in the nonlinear mode is preserved. Perhaps all this could be done differently and easier. But I don't know And now everything works. Thank you!

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
LEGEND ,
Aug 08, 2018 Aug 08, 2018

I tried it by Action Manager, but couldn't figure out why it doesn't work. I assume it has as you can do the same by DOM as JJMack mentioned: preferences.nonLinearHistory = true. Possibly someone will be smarter to use Action Manager for it.

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
Explorer ,
Aug 08, 2018 Aug 08, 2018

Thank you! That's what you need! Everything worked as it should.

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
People's Champ ,
Aug 09, 2018 Aug 09, 2018

Kukurykus 

I tried it by Action Manager, but couldn't figure out why it doesn't work. I assume it has as you can do the same by DOM as JJMack mentioned: preferences.nonLinearHistory = true. Possibly someone will be smarter to use Action Manager for it.

var d = new ActionDescriptor();

var r = new ActionReference();

r.putProperty(stringIDToTypeID("property"), stringIDToTypeID("historyPreferences"));

r.putEnumerated(stringIDToTypeID("application"), stringIDToTypeID("ordinal"), stringIDToTypeID("targetEnum"));

d.putReference(stringIDToTypeID("null"), r);

var d1 = new ActionDescriptor();

d1.putInteger(stringIDToTypeID("nonLinear"), true);

d.putObject(stringIDToTypeID("to"), stringIDToTypeID("historyPreferences"), d1);

executeAction(stringIDToTypeID("set"), d, DialogModes.NO);

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
LEGEND ,
Aug 09, 2018 Aug 09, 2018

I missed second descriptor in my code, however correctly there should be putBooleand not putInteger in your code?

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
People's Champ ,
Aug 09, 2018 Aug 09, 2018

Yes, I screwed up

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
LEGEND ,
Aug 09, 2018 Aug 09, 2018
LATEST

No, it works.

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