AppleScriptsNewBie

Hello, i’m new to appleScripts… is there a way… that i could read from the mac’s open directory so that i may know who’s user is log on/in?

Can anyone help me with this…? i need a script /sub routine that will return the user name the person whois currently log in to his computer…

Does this provide the desired info?

set who_ to do shell script "who"
display dialog who_ buttons {"OK"} default button 1

Tested with OS X 10.3.5.

– Rob

set currentUser to system attribute "USER"

j

:frowning: can’t get it to work… error

:shock: Oops :smiley: it works… just need to edit it somehow… thanks to all of you guys… really it helps me a lot