ggettin path from set

Hi

Shell script and Terminal have a set of definitions. $USER. $PWD. And so on.

Applescript has a different set of these definitions.

How can I put something in this set definitions owned by Applescript?

Any tip or hint is welcome.

Regards
Lazy

If I misunderstand you totally right, then the answer is that you can’t really.

Not without writing an OSAX as that would be the only way to add to the Applescript environment globally.

You must realize that Applescript is loaded as a procecss every time you execute a script.

There is indeed a shared instance of AppleScript all the processess get values from, and text item delimiters (AppleScript’s) gets even exported back, but you can’t add properties to AppleScript. -That would really have been a nice, and dangerous feature! :slight_smile:

A way to simulate it would be to store some property in a script.

It it is an Environment variable from the shell you want to make globally accessible from login and henceforth, then it can be stored in ./MacOsX/Environment.plist on Snow Leopard and somewhere in a launchctl plist in LIon and Mountain Lion.

Try rephrasing your question if this didn’t answer it.