Copy link to clipboard
Copied
I'm trying to access my windows user variables on the machine but when I use `getenv()` or `getenv_s()` it's not returning any data....
Looking at scripting you acess them with `$.getenv()` so what would be the correct function in the C++ api?
For either Automation or Filter.
The Windows API function is GetEnvironmentVariable or GetEnvironmentVariableW for Unicode. I would expect getenv to work too, unless you are setting the environment variable after Photoshop starts. Discussion: When What You Set is Not What You Get: SetEnvironmentVariable and getenv - CodeProject
Copy link to clipboard
Copied
The Windows API function is GetEnvironmentVariable or GetEnvironmentVariableW for Unicode. I would expect getenv to work too, unless you are setting the environment variable after Photoshop starts. Discussion: When What You Set is Not What You Get: SetEnvironmentVariable and getenv - CodeProject
Copy link to clipboard
Copied
Thanks TestScreen! Didn't even think of that library. No, getenv for some reason won't work with either the Automation or Listener... ![]()
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more