Jump to content

Getting the system UserLogon name

This topic is 4356 days old. Please don't post here. Open a new topic instead.

Recommended Posts

" DesktopPath: " & Get(DesktopPath) & " UserName: " & Get(UserName) & " UserAcount: " & Get(AccountName) & " HostName: " & Get(HostName)

When I use the DesktopPath function I get something like : Macintosh HD/Users/DanielPaquin/Desktop

What I am interested in getting is the information contained between /Users and /Desktop i.e: DanielPaquin

I've tried UserName and AccountName and found out those were in relation to FMP. I then used HostName which gave me the name of the MacMini server, in this case being ARWEN.

Is there a get function which would give me only DanielPaquin

In the meantime I will continue searching.

Best regards!


Link to comment
Share on other sites

The data files used by the FMP DBMS I am currently creating is always located in the UserLogon name directory. At that location, there also a list of folders which are used by other MAC system component. Then if a user logon onto the system under MrX, all required files will then be located under ../Users/MrX/...

I am trying to see if there is a quick way to point to that folder without parsing.

At this moment, I am using this parsing function which I need to clean up since FMP is giving me an error.

Best regards!


Let ( [

StartPos = Position ( Get(DesktopPath) ; "/Users/" ; 1 ; 1 )+7;

Len = Position ( Get(DesktopPath) ; "/Desktop" ; 1 ; 1 ) - StartPos;

UserHost = Middle (get(DesktopPath); StartPos;Len)

] );

Link to comment
Share on other sites

This topic is 4356 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...

Important Information

By using this site, you agree to our Terms of Use.