Problems with Javascript on Mac, but not PC

I run into some strange problems with a script in which Mac another user stops on a line nothing stores more than one State of history to the variable "actHist" while PC to run the script very well.  We will test the script one Mac to another later today, but I was wondering if there are any known issues with running scripts in Java on Mac vs PC database?  Here is a screenshot of the problem:

MacError.png

I can't understand WHY it stops on this area.  I tried of asigning the variable outside of the cause of the else statement that I was out of ideas, but it's the same no matter where I declare it.  The odd part is, that the same line is used elsewhere in the script without problems, it doesn't seem to work in the same place on a Mac (PC has no problems with it).  No idea why this is only a problem for the Mac and not any PC?

Advertisement

Tom's right. It is a known problem and Adobe has been alerted to this topic. This error can also occur when you try to access the activeLayer of a document.

I used this code for embarrassing lines like this and it worked for me:

try {
   doc = app.activeDocument;
} catch  (e) {
   $.sleep(500);
   var desc = new ActionDescriptor();
   desc.putEnumerated(cTID("Stte"), cTID("Stte"), cTID("RdCm"));
   executeAction(cTID("Wait"), desc, DialogModes.NO);

   doc = app.activeDocument;
}

It did not work for others. Someone suggested using the:

   try {
      doc =  app.activeDocument;

   } catch (e) {
      app.refresh();
      doc =  app.activeDocument;
   }

I have not tried because I don't have a reproducible test case.

Tags: Photoshop

Similar Questions

Maybe you are looking for

  • Security certificate error

    Hello. I bought a laptop Dell Mini Inspiron in August for graduate studies. At first, I don't have a problem connecting to Internet Explorer by using the school WIFI service. However, after the first week, I developed a problem where I can't connect

  • How to convert TIFF to JPEG

    I have Windows Vista. Is there a way to convert pictures format TIFF to JPEG without buying extra software?

  • 2nd monitor

    Can I attach a 2nd monitor the Omni of all in one?

  • Garbage in Orchestration server entries: responsibilities

    I see in the Orchestration server properties of the my CPO - tab of responsibilities, there are 3 entrances for subscription AMQP. On the 3, I use one in some of my workflows. But the other two "unknown (some id)" is not available in the POC and not

  • JavaScript if statement

    HelloI'm not good at javascript, so I got this button "Save as...". "and a javascript message box will appear asking if they guarantee the document before saving:xfa.host.messageBox ("ATTENTION", "have you you secure the prior of document recording?"


HashFlare