Re: Two related questions:
Re: Two related questions:
- Subject: Re: Two related questions:
- From: Paul Berkowitz <email@hidden>
- Date: Thu, 19 Sep 2002 11:45:39 -0700
On 9/19/02 9:55 AM, "John C. Welch" <email@hidden> wrote:
>
On 09/19/2002 06:43, "Philip Aker" <email@hidden> wrote:
>
>
>> 1) (I know this has come up , but I can't remember my userid/passsword
>
>> for the archives, so forgive me) How does one go about getting the
>
>> currentlogged in user short name, aka userid
>
>
>
> set uname to (do shell script "id -un")
>
> set uid to (do shell script "id -u")
>
> uname & "=" & uid
>
>
The easier way is whoami....gives me what I want ;-)
Here's another way, without shell scripting:
system attribute "USER"
(That may even work pre-OS X as
tell app "Finder" to computer "USER"
but I have no idea what it gets you if it does.)
--
Paul Berkowitz
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.