|
|
Return the short username in AppleScript
You could also use this way:
system attribute "USER"
There are other variables available with system attribute: "HOME": posix path to users home directory "SHELL": posix path to users shell "USER": users short name "LANG": user system language as two-letter code e.g. "en_US" "PATH": content of the PATH variable "__CF_USER_TEXT_ENCODING": Don't know the meaning of this
Return the short username in AppleScript
I like the idea of user the 'system attribute' but forgive my ignorance, how do I USE it? (an example would be great)
Return the short username in AppleScript
Another option that I use a lot:
Return the short username in AppleScript
How to use it:
set short_name to system attribute "USER"Now the variable short_name will contain your short user name.
The AppleScript way
Or:
set userName to short user name of (system info) |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.09 seconds |
|