• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Way to get user name?

LEGEND ,
Aug 23, 2011 Aug 23, 2011

Copy link to clipboard

Copied

Is there anyplace where the user name is stored and can be accessed by javascript? I doubt that it is stored anywhere that is accessible to the script.

Other than opening a dialog and asking for user entry is there any way that it could be made automagic?

TOPICS
Scripting

Views

837

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Enthusiast , Aug 23, 2011 Aug 23, 2011

Votes

Translate

Translate
Adobe
Enthusiast ,
Aug 23, 2011 Aug 23, 2011

Copy link to clipboard

Copied

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 23, 2011 Aug 23, 2011

Copy link to clipboard

Copied

Thank you so much. I had seen the $ (Class?) and taken a peek through its methods and properties using the object model viewer. I had seen getenv(), but didn't know how to use it—or really most of the other stuff in there.

$.getenv (name: string 😞 string

Core JavaScript Classes

Retrieves the value of an environment variable.

name: Data Type: string

The name of the variable.

The help says this about $.getEnv(), but how do I find the different strings for the environment variables?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Aug 23, 2011 Aug 23, 2011

Copy link to clipboard

Copied

LATEST

See: http://en.wikipedia.org/wiki/Environment_variable

In Windows, all in Default Values on Microsoft Windows table are valid strings.

var environVar = ["ALLUSERSPROFILE", "PROGRAMDATA", "APPDATA", "COMPUTERNAME", "COMMONPROGRAMFILES", "COMMONPROGRAMFILES(x86)", "COMSPEC", "HOMEDRIVE", "HOMEPATH", "LOCALAPPDATA", "LOGONSERVER", "PATH", "PATHEXT", "PROGRAMFILES", "PROGRAMFILES(X86)", "PROMPT", "SystemDrive", "SystemRoot", "TEMP", "USERDOMAIN", "USERNAME", "USERPROFILE", "WINDIR", "PUBLIC", "PROGRAMDATA", "PSModulePath"],      i = 0, len = environVar.length; for (; i< len; i++){      $.writeln(environVar + ': ' + $.getenv(environVar)); }

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines