Andrew, try this:

declare function GetUserNameA Lib "advapi32.dll" (User As String, i As
Integer) As Logical
declare function GetUserName() As String

'***************************************************************************
****
Function GetUserName() As String
'***************************************************************************
****
Dim User As String
Dim i As Integer
 i=30
 User=String$(i," ")
If GetUserNameA(User,i) Then
 GetUserName=RTrim$(User)

Else GetUserName=""
End If

End Function

You can then use the variable GetUserName, which is a string containing the
user name.


Regards
Graham



----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: 27 June, 2002 10:22 AM
Subject: MI-L Calling a User ID


I am building a script to automatically tag a line with the name of the
person who digitised it.

I would like to call the Windows UserName of the currently logged on user to
do this.

Does anyone know how to call the name of the currenltly logged on user with
a MapBasic script?

Andrew


This E-mail and any files transmitted with it are private and intended
solely for the use of the individual or entity to whom they are addressed.
If you are not the intended recipient, the E-mail and any files have been
transmitted to you in error and any copying, distribution or other use of
the information contained in them is strictly prohibited.

Nothing in this E-mail message amounts to a contractual or other legal
commitment on the part of English Nature unless confirmed by a signed
communication.

English Nature will make every effort to keep its network free of viruses.
However, the recipient of this message will need to scan this message, and
any attachments, for viruses, as English Nature can take no responsibility
for any computer virus that might be transferred by this e-mail.

---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to