Skip to main content
Participating Frequently
October 4, 2021
Question

maybe a bug with $.getenv()

  • October 4, 2021
  • 1 reply
  • 225 views
ExternalObject.AdobeXMPScript = void 0 === ExternalObject.AdobeXMPScript ? new ExternalObject("lib:AdobeXMPScript") : ExternalObject.AdobeXMPScript;
var xmpData= new XMPMeta(app.project.xmpPacket);
$.setenv(xmpData.getProperty(XMPConst.NS_XMP_MM, "DocumentID").value, []);

alert(
$.getenv(xmpData.getProperty(XMPConst.NS_XMP_MM, "DocumentID").value)
)

 

on Mac it returns "" ,

on Win it returns null

 

Any idea?

This topic has been closed for replies.

1 reply

Justin Taylor-Hyper Brew
Community Expert
Community Expert
January 30, 2023

Could be a bug with your version of AE. I just tested this and it's working in AE 2022:

 

 

$.setenv('mybar', 'abc');
$.getenv('mybar'); // 'abc'

 

 

Here's some info on those methods: https://extendscript.docsforadobe.dev/extendscript-tools-features/dollar-object.html?highlight=getenv#getenv