MacOS – How to use environment variables in applescript

applescriptenvironment-variablesleopardmacos

I'd like to use my environment variables, which were defined in my environment.plist file, in my applescript.

How do I do that, for instance:

log "Glassfish Home: " & AS_HOME

Where AS_HOME is my environment variable.

Best Answer

Try this:

log "Glassfish Home: " & (system attribute "AS_HOME")