Skip to main content
Participating Frequently
August 22, 2016

P: ActiveHistoryState after changing activeDocument doesn't work at all

  • August 22, 2016
  • 9 replies
  • 486 views

I have a script, which basicly changes activeDocument to doc_a, then it changes activeDocument back do doc_b and tries to check activeDocument.activeHistoryState here. It always stops executing here and I get "General Photoshop error occured. This functionality may not be available in this version of Photoshop.". Any ideas how to solve this?

The code for reproducing this bug: (I'm using CC 2015.5.1, but it doesn't work on CC 2014 either)

app.activeDocument = app.documents[0];  
app.activeDocument = app.documents[1];  
$.writeln(app.activeDocument.activeHistoryState);  
This topic has been closed for replies.

9 replies

lukaszmtwAuthor
Participating Frequently
November 12, 2016
It looks like it's solved now. Thanks! 🙂
November 3, 2016
Good
Tom Ruark
Inspiring
November 3, 2016
Try with CC 2017. I believe we fixed this issue.
lukaszmtwAuthor
Participating Frequently
August 22, 2016
Thanks!
Adobe Employee
August 22, 2016
I would say that we are looking into it.  Other than that I cannot comment on when a specific fix is coming.  Sorry to be nebulous.  
lukaszmtwAuthor
Participating Frequently
August 22, 2016
Is it likely to be fixed in the next PS release?
Adobe Employee
August 22, 2016
Yes it does add a delay.  I do not have a ETA right now.  

As a side note:

We are not seeing the error on Windows.  So you can use a Windows machine if you want to not use the app.refresh
lukaszmtwAuthor
Participating Frequently
August 22, 2016
This works, but it adds unwanted delay. Any ETA for a fix?
Adobe Employee
August 22, 2016
Hello this is a bug.  Sorry.  As a work around please try this.

app.activeDocument = app.documents[0];  
app.activeDocument = app.documents[1];  
app.refresh();
$.writeln(app.activeDocument.activeHistoryState);