[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] who is logged on



"Ken Cartner (News)" <ken@nando.com> writes:
>I'm working on a script that will open a text file and copy text into a
>new document. This part I have no trouble with. But what text is copied
>will depend on who the user is that is running the script. So here's my
>question.
>
>How can I find out who the user is? I know that the user will have a
>particular volume mounted (because the script will be run from this
>volume). Is there a way in MacPerl to find out how the user is logged
>on, ie the user name?

I can offer you one certain and one uncertain promise:

 - What is certain is that in MacPerl 5.1.5, $ENV{USER} will be defined as
   the user name entered in the Sharing Setup Control Panel.
 - A more precise definition for your question might be the user name used
   to log on to one particular AppleShare volume. I'll have a look at this, and
   if it doesn't look too difficult, I might support that in Mac::Files or
   Mac::MoreFiles.

Matthias

-----
Matthias Neeracher   <neeri@iis.ee.ethz.ch>   http://www.iis.ee.ethz.ch/~neeri
  "If people are boasting that they use the best tools, you can figure that 
   they can't find any competitive advantage to using those tools, or else
   they wouldn't be presenting them as a competitive advantage." -- Dave Winer

***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch