• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
getting User Name without do shell script
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

getting User Name without do shell script


  • Subject: getting User Name without do shell script
  • From: Jonathan Reff <email@hidden>
  • Date: Mon, 28 Apr 2003 18:33:24 -0700

There was a good thread back in October about ways of getting the User Name (the full name, not the short name) in OS X, with several recommendations on how to do this using the "do shell script" command.

Unfortunately, that doesn't seem to work when run from within a Classic application (Canto Cumulus 5.5.2, the script is attached to one of Cumulus' menus.) Other parts of the script will run, but once it gets to the "do shell script" command it fails. I tried putting it in a tell block aimed at the Finder and other OS X applications, but that didn't help.

Allright, I thought, we're in Classic, we'll do it the old fashioned way:
tell application "File Sharing" to set theUser to owner name
But this just yields "The application File Sharing has unexpectedly quit." The same thing I get if I double-click on the File Sharing control panel in the Finder. Not surprising, since OS 9's File Sharing has no place in OS X.

So, is there any way of getting the full name without a shell script? Chris Espinosa pointed out System Attribute "USER", but this gives the short name. I've poked around looking for a text file that might contain the user name that I could parse, but I haven't found one.

Any help is appreciated,

Jonathan
_______________________________________________
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.

  • Prev by Date: Re: iTunes 4 & Artwork scripting... Ahhh?
  • Next by Date: I want to write an auto-login start-up script...
  • Previous by thread: Re: iTunes 4 & Artwork scripting... Ahhh?
  • Next by thread: I want to write an auto-login start-up script...
  • Index(es):
    • Date
    • Thread