[futurebasic] Name of Computer

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : November 2003 : Group Archive : Group : All Groups

From: Peter Boyle <pboyle@...>
Date: Fri, 21 Nov 2003 16:31:36 -0500
To all the people who have helped me without you knowing it I can only say
thank you very much. I lurk in the background and read all the list threads
and follow them through. There seems to be something in the ethernet that,
each time I have a problem, somebody else has a similar problem, and the
guru's solve it, and from that solution I can solve my problem. Well the
problem I've got now doesn't seem to be on anyones radar.
The following function used to give me the name of the computer that
produced the data output, we have four designers producing joist designs
using the same program, and I need to know which one produced a specific
design. I could embed each persons name in their copy of the program, but
that seems to be not very elegant, and looking at the code that this list
produces I would be  less than happy in comparison , not that I will ever be
able to rise to the elegance of Alain, Ken, Brian, Robert etc.
Anyway enough gushing, here is code that used to work in OS9
I assume that the second parameter in GETRESOURCE is not valid in OSX
but I have no knowledge about what it should be.

LOCAL FN chooserName$
DIM 15 cName$,rHndl&

rHndl& = FN GETRESOURCE(_"STR ",49440)
LONG IF rHndl&
cName$ = PSTR$([rHndl&])
cName$ = "Pablo"
END FN = cName$