Determine the user at runtime


is there way determine current user @ runtime?

 

i have many people using scripts daily , i'm working on building logging , error reporting api can build detailed log files and  accurately identify source of errors. part of this, want determine user running script can log information inside log entry.

 

we're running macs here, need works on osx. i'm reading contents of /users/ folder (with folder.getfiles()) find user's name, i'm hoping find little more reliable. can guarantee each user has folder in /users/ folder name on it. however, /users/ folder contains other files , can contain multiple users (for example, have 'will.dowling' folder , 'admin' folder).

 

i weed out of known undesirable names (.localized, ds store, etc) still leave myself open possibility creates unexpected file or directory in there.

 

tldr;

is there in adobe illustrator api allows me accurately read unique information user can attach username log file?

 

thanks in advance. =)

you can use $.getenv ("user")  mac's user names.



More discussions in Illustrator Scripting


adobe

Comments

Popular posts from this blog

Reader DC

AdobeIDの作り方

Adobe InDesign CC 2017 has stopped working