Getting the local computer name

11 views
Skip to first unread message

andre.tremblay

unread,
Feb 23, 2021, 9:07:23 PM2/23/21
to SuperCard Discussion
Maybe someone may help to refresh the memory cells of my spongy brain on how I can get the local computer name from SuperCard?

Peter Jenkins

unread,
Feb 23, 2021, 9:41:42 PM2/23/21
to SuperCard Discussion
Hi Andre

This is what I use in my SuperTalk scripts:

put line 1 of shell("hostname") into gHostName

Peter

MARK LUCAS

unread,
Feb 23, 2021, 10:59:30 PM2/23/21
to superca...@googlegroups.com
It's probably worth noting that the value returned by hostname is your Mac's current network identifier (not its name). Unlike the name a network identifier isn't guaranteed to persist across connections, and can optionally be configured to something not based on the computer name (so you can't reliably derive it by jiggering the name). It also may or may not match the Bonjour name.

Which of these you really want thus depends on what you're planning to use it for…

-Mark


--
You received this message because you are subscribed to the Google Groups "SuperCard Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to supercard-tal...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/supercard-talk/9b01aa83-d065-4b3a-aec9-33d08fc30e9dn%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages