Mac - Computer Name - Omnis 11.1 - OS Sequoia
Michael Mantkowski
michaelj at clientrax.com
Thu Oct 3 13:56:57 UTC 2024
Thanks Phile and Nigel,
I will try this and report back.
Michael
*********************************************************************
Michael Mantkowski
ClienTrax Software
1-614-875-2245
*********************************************************************
-----Original Message-----
From: omnisdev-en On Behalf Of Phil (OmnisList)
Sent: Thursday, October 3, 2024 9:54 AM
To: omnisdev-en at lists.omnis-dev.com
Subject: Re: Mac - Computer Name - Omnis 11.1 - OS Sequoia
Michael,
Begin text block
Text:computer name of (system info)
Get text block lvScript
Do $runapplescript(lvScript,lcComputerName)
or for an IP address:
Calculate lcApScript as 'set myip to do shell script "'
Calculate lcApScript as con(lcApScript,"ifconfig | grep 'broadcast' | awk
'{print $2}'") Calculate lcApScript as con(lcApScript,'"') Do
$runapplescript(lcApScript,lcIP_Address)
If pos(kCr,lcIP_Address)
Calculate lcIP_Address as mid(lcIP_Address,1,pos(kCr,lcIP_Address)-1)
End If
Do replaceall(lcIP_Address,'"','') Returns lcIP_Address
regards
Phil Potter
Based in Chester in the UK.
On 03/10/2024 13:48, Michael Mantkowski wrote:
> We upgraded one of our Mac clients to Omnis 11.1 yesterday after they had
upgraded their Mac OS to Sequoia and Omnis 4.3.2.1 would no longer work for
them.
>
> Running into an issue with getting the computer name of the workstation
they are on. We had been using the code below to find it. It no longer seems
to work and the built in Omnis getenv() also does not work.
>
> Anyone know how to do this with newer Mac OS version?
>
>
> f inMac
> Do code method CodeClass/RunMacShell ("grep '<key>ComputerName</key>'
/Library/Preferences/SystemConfiguration/preferences.plist -A 1 | grep
'<string>' ") Returns lvReturn
> Calculate lvReturn as mid(lvReturn,pos('>',lvReturn)+1)
> Calculate ctComputerName as mid(lvReturn,1,pos('<',lvReturn)-1)
> Else
> Calculate ctComputerName as getenv("COMPUTERNAME") End If
>
>
> This is all used to eventually get the IP Address of the local workstation
and the database server so that we can Ping it for online verification.
Since the above fails the Ping Fails as well. I ended up having to disable
the whole server verification to get them running last night.
>
>
> *********************************************************************
> Michael Mantkowski
> ClienTrax Software
> 1-614-875-2245
> *********************************************************************
>
>
>
> _____________________________________________________________
> Manage your list subscriptions athttps://lists.omnis-dev.com
> Start a new message ->mailto:omnisdev-en at lists.omnis-dev.com
_____________________________________________________________
Manage your list subscriptions at https://lists.omnis-dev.com
Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com
More information about the omnisdev-en
mailing list