In my case ComputerName() returns "MacBook.local" on work and "MacBook.Speedport_Router_xyz" at home.
Is this a bug or an undocumented feature?
ComputerName() returns ComputerName.Router
Re: ComputerName() returns ComputerName.Router
I don't know about PureBasic's function, but you can get a better version like this:
Code: Select all
host = CocoaMessage(0, 0, "NSHost currentHost")
hostName = CocoaMessage(0, host, "name")
string = CocoaMessage(0, hostName, "UTF8String")
Debug PeekS(string, -1, #PB_UTF8)
localisedName = CocoaMessage(0, host, "localizedName")
string = CocoaMessage(0, localisedName, "UTF8String")
Debug PeekS(string, -1, #PB_UTF8)
Debug ComputerName()Re: ComputerName() returns ComputerName.Router
Thanks
The Purebasic version returns the wrong machine name when virtual machines are running.
The Purebasic version returns the wrong machine name when virtual machines are running.
My Projects EventDesigner V3 / ThreadToGUI / OOP-BaseClass / Windows: Module ActiveScript
PB v3.30 / v5.75 - OS Mac Mini - VM Window Pro / Linux Ubuntu
Downloads on my OneDrive
PB v3.30 / v5.75 - OS Mac Mini - VM Window Pro / Linux Ubuntu
Downloads on my OneDrive


