getting the user name

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

Post Reply
dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10508
Joined: Wed May 06, 2009 2:28 pm

getting the user name

Post by dunbarx »

I have always wondered about the (large) portion of the dictionary that is not in the, er, dictionary. The "messageMessages" comes to mind.

But simply finding the "username" is not straightforward, at least I believe. ChatGPT turned me on to "$USER" which gives the login name for my machine. Anyone know of a better way? It seems rather useful a tool, so one can tailor a stack to specific users, like I just needed to do.

Craig
SparkOut
Posts: 2989
Joined: Sun Sep 23, 2007 4:58 pm

Re: getting the user name

Post by SparkOut »

In the Script Editor, you can toggle the visibility of Global (or System?) variables. Then in the variables list you'll see a lot of entries beginning with $ that provide lots of information about the user environment. They're mostly easy enough to work out what each provides, but I think they're in the dictionary.
Post Reply