Skip to main content
Participating Frequently
Aug 22, 2016 3:04 PM UTC
Released

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

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 is closed to new replies. Start a new post to keep the conversation going.

9 replies

lukaszmtwAuthor
Participating Frequently
Nov 12, 2016 11:47 AM UTC
It looks like it's solved now. Thanks! 🙂
Translate
Nov 3, 2016 10:05 PM UTC
Good
Translate
Tom Ruark
Inspiring
Nov 3, 2016 10:03 PM UTC
Try with CC 2017. I believe we fixed this issue.
Translate
lukaszmtwAuthor
Participating Frequently
Aug 22, 2016 8:59 PM UTC
Thanks!
Translate
Adobe Employee
Aug 22, 2016 8:57 PM UTC
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.  
Translate
lukaszmtwAuthor
Participating Frequently
Aug 22, 2016 8:19 PM UTC
Is it likely to be fixed in the next PS release?
Translate
Adobe Employee
Aug 22, 2016 8:10 PM UTC
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
Translate
lukaszmtwAuthor
Participating Frequently
Aug 22, 2016 6:00 PM UTC
This works, but it adds unwanted delay. Any ETA for a fix?
Translate
Adobe Employee
Aug 22, 2016 5:58 PM UTC
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); 
Translate